[pycrypto] Once again: Python3 with PyCrypto

Dwayne C. Litzenberger dlitz at dlitz.net
Fri Dec 24 00:48:44 CST 2010


On Thu, Dec 23, 2010 at 11:51:33PM -0500, Thorsten Behrens wrote:
>On 12/23/2010 9:18 PM, Dwayne C. Litzenberger wrote:
>> Also, down the road, I could be convinced to drop Python 2.1 support, if I
>> had some concrete examples showing that the result would be substantially
>> less error-prone, easier to maintain, etc.
>So far, it doesn't look like that's needed. dict.has_key() cannot be 
>replaced with "in" for 2.1, but 2to3 seems to handle it fine.

Excellent.  Thanks for that insight.

>Does "setup.py test" touch all of the pycrypto library, or only part of 
>it? That is, can I rely on its output to know whether a conversion to 
>Python 3.x was successful?

Only part of it.  I'd love to see more tests.

If you end up writing more tests that include test vectors, be sure to 
always include comments that describe where the test vectors came from, and 
avoid generating test vectors using PyCrypto itself (there could be more 
bugs like the SHA256 56-modulo-64 bug, and I don't want them enshrined in 
the test suite).

-- 
Dwayne C. Litzenberger <dlitz at dlitz.net>
  OpenPGP: 19E1 1FE8 B3CF F273 ED17  4A24 928C EC13 39C2 5CF7


More information about the pycrypto mailing list