M2Crypto Nearly Python 2.6/3.0 Compatible

I finally got around to compiling Python 2.6 alpha 2 on Ubuntu 7.10, and I tested the M2Crypto trunk with it. Now it is possible I messed up my test environment somewhat (I tried to install setuptools into 2.6, which I failed at, and after installing Virtual Python I realized I had clobbered over my previous Virtual Python installation, so I may have been running with some mixture of 2.5 and 2.6 code, although I doubt any of that could have affected the actual tests).

M2Crypto currently has 200 unit tests. They are all supposed to pass. Out of those, just one failed with 2.6. The weird part is that the failing test is an SMIME.verify test which fails by producing a wrong exception. The test expects SMIME.PKCS7_Error, but instead the program runs a couple of lines further in the verify method and raises the generic SMIME_Error as a fallback, but there is no additional information about the error. At this point it seems rather mysterious.

Running the unit tests with -3 option to warn about 3.0 incompatibilities does not find anything to complain about in the M2Crypto code base. I do know there are some lines (notably print statements) in M2Crypto that are not legal in 3.0, though. Ironically there are lines in the 2.6 unittest module that -3 complains about. 2.6 also gave deprecation warnings about the sha module, but these we will have to live with since the recommended hashlib module was introduced in 2.5 and M2Crypto needs to support 2.3 and later.

Similar Posts:

    None Found