Commit Graph

8 Commits (ce76fd130abcdd40fd0cfc4bfe5030a8dd426e85)

Author SHA1 Message Date
Isis Lovecruft 6b154c294e
Change LICENSE to GPLv3+, after discussion with intrigeri.
* ADD docs/change-license-emails.txt, which includes email exchanges between
   myself and intrigeri, including links to Debian and LEAP mailing lists with
   arguments for and against using AGPL for a library.
 * CHANGE license header for all files.
 * CHANGE LICENSE file and gnupg/copyright.py to use GPLv3+ text.
2013-07-27 19:27:53 +00:00
Isis Lovecruft 8bad2f3c05
Merge remote-tracking branch 'mmn/mktime_takes_localtime_not_gmtime' into develop
* FIX struct_time inputs to time.mktime() to use localtime() not gmtime().
 * CLOSES #9: "mktime takes local time, not UTC"
   https://github.com/isislovecruft/python-gnupg/pull/9
2013-07-26 14:32:43 +00:00
Mikael Nordfeldth 9ff03b5be7 mktime takes localtime, or we skew the clocks
The following snippet shows that to create a proper timestamp, we should
feed mktime() with localtime() data rather than gmtime(), as it is locale
aware.

>>> from time import mktime, gmtime, localtime
>>> bad    = gmtime(mktime(gmtime()))
>>> good   = gmtime(mktime(localtime()))
>>> judge  = gmtime()
>>> if bad == good: "You're using UTC. Demonstration is impossible."
... elif bad == judge: "I can be wrong"
... elif good == judge: "but this shows I'm right"
...
"but this shows I'm right"

The above code checks whether gmtime() == gmtime(timestamp) from
mktime(). Obviously we don't get the same 'now' if we feed the bad value
to mktime.
2013-07-26 01:02:46 +02:00
Mikael Nordfeldth a3e811a919 Python 3 fixes for chmod and exceptions 2013-07-24 15:04:15 +02:00
Isis Lovecruft 603379eb37
Change _copy_data() error handling to explain errors not due to broken pipes. 2013-06-28 06:40:09 +00:00
Isis Lovecruft e1139c7e37
Remove commented out code from _util._copy_data(). 2013-06-09 08:36:22 +00:00
Isis Lovecruft ceb38fdefe
Change directory shortcuts in gnupg._util.py module. 2013-06-09 08:33:30 +00:00
Isis Lovecruft 042d52a75f
Move source files to directory named for top-level package. 2013-06-03 21:16:19 +00:00