[pycrypto] Once again: Python3 with PyCrypto

Johannes Bauer JB.Imm at gmx.de
Tue Nov 23 07:23:16 CST 2010


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


More information about the pycrypto mailing list