[pycrypto] Once again: Python3 with PyCrypto

Dwayne C. Litzenberger dlitz at dlitz.net
Mon Nov 29 22:07:13 CST 2010


Hi Johannes,

Would you like to champion Python 3.x support?  I don't really know what's 
involved in doing Py3k support, but I'd like to see it happen, provided 
that it doesn't involve breaking Python 2.x support or a lot of unnecessary 
code duplication.  How do other Python projects that have C code maintain 
compatibility across both Python 2.x and 3.x?

- Dwayne

On Tue, Nov 23, 2010 at 02:23:16PM +0100, Johannes Bauer wrote:
>Hi there,
>
>I wanted to ask what the current status of PyCrypto together with
>Python3 is.
>
>I found three patches on the mailing list, all of which are against
>2.1.0 and none of which work.
>
>Two were in a ZIP archive, I found them in pycrypto-patches.zip
>http://lists.dlitz.net/pipermail/pycrypto/attachments/20100228/349e8dc6/attachment-0001.obj
>
>They both patch fine against 2.1.0, but when running, they tell me both
>the same error message:
>
>Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48)
>[GCC 4.4.3] on linux2
>Type "help", "copyright", "credits" or "license" for more information.
>>>> from Crypto.Cipher import AES
>Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>SystemError: NULL result without error in PyObject_Call
>>>>
>
>The third I found here (pycrypto-2.1.0-python3-1.patch.bz2).
>http://lists.dlitz.net/pipermail/pycrypto/attachments/20100115/0432fbaf/attachment-0001.bin
>
>
>It also compiles, but when trying to access the library, it yields
>
>Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48)
>[GCC 4.4.3] on linux2
>Type "help", "copyright", "credits" or "license" for more information.
>>>> from Crypto.Cipher import AES
>Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>ImportError: Crypto/Cipher/AES.so: undefined symbol: PyString_AsString
>>>>
>
>I also tried the GIT version, which also doesn't work (cannot even run
>setup.py with Python3).
>
>Is any Python3 support planned at all? Are there any working patches (or
>even a GIT branch)?
>
>Regards,
>Johannes
>_______________________________________________
>pycrypto mailing list
>pycrypto at lists.dlitz.net
>http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
>

-- 
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