#35 new defect

Python 3 support

Reported by: ben Owned by:
Priority: major Milestone:
Version: 0.5.17 Keywords:
Cc: Nikolaus@… Launchpad Bug:

Description

It'd be nice if pycryptopp supported Python 3 as more projects start gaining support for it.

Change History (15)

comment:1 Changed at 2010-07-06T05:13:16Z by zooko

Well, since a real user has formally requested it, I guess I'll go ahead and actually start paying attention to Python 3 now! I guess the first step is to turn on the feature of "warn me about stuff that I do which will break in Python 3". What's that flag called, -3?

comment:2 Changed at 2011-01-17T20:04:52Z by Nikratio

Oh, if you're waiting for requests: I'm eagerly waiting for a Python 3 version too!

comment:3 Changed at 2011-01-17T20:05:10Z by Nikratio

  • Cc Nikolaus@… added

comment:4 Changed at 2011-01-23T05:55:00Z by zooko

Okay, duly noted. I intend to support Python 3 in the future. The question of "when" however, is obviously strongly influenced by other people pitching in and doing some of the work, as I have a zillion other things to do and I don't personally expect to use Python 3 for the forseeable future.

So: yes, I approve in principle, will support people who contribute patches to make it happen, and will even probably write such patches myself someday.

Thanks for the feature request!

comment:5 Changed at 2011-08-18T14:17:02Z by Nikratio

Just bumping this up again to assert that I haven't lost interest in this since my last request.

comment:6 Changed at 2011-08-18T15:19:01Z by zooko

Hey, thanks for the encouragement! I'm really busy right now with a new startup and with Tahoe-LAFS v1.9. If anybody out there reading this wants to contribute some code, write patches to make pycryptopp source code work in both Python 2 and Python 3. For the parts of pycryptopp that are actually written in Python, you can use this library:

http://packages.python.org/six/

However, most of the pycryptopp is written in C++ in the CPython API. I don't know how much that API changed from Python 2 to Python 3. I seem to recall that the Python developers deliberately tried to minimize unnecessary changes in that API, so hopefully it won't require a lot of porting.

comment:7 Changed at 2011-08-18T15:26:27Z by Nikratio

Wouldn't it be easier to just run the Python parts through 2to3.py at install time? distutils/distribute can do that automatically. That's what I do for my Python modules.

comment:8 Changed at 2011-08-18T15:36:07Z by zooko

I haven't tried it, so I don't know if it would be easier. My instinct is to stay far away from source-to-source translators. However, since I'm not currently volunteering to do the work, I would consider accepting and maintaining a patch from someone who did it that way. We would need strong automated testing so that if a new patch committed to the (Python 2) trunk causes a breakage in the Python 3 autogenerated version, we find out right away (by the unit tests detecting it and by the buildbot running those unit tests on every commit).

The amount of Python code in pycryptopp is so small that porting it to use the six library is probably little effort.

comment:9 Changed at 2011-08-19T03:13:51Z by zooko

Coincidentally Benjamin Peterson, the maintainer of six and of 2to3, showed up on the #tahoe-lafs IRC channel tonight looking for secure distributed backup. I pointed this ticket out to him, and he said:

<gutworth> I also maintain 2to3, but I also have to agree, keeping one source is usually easier.

comment:10 Changed at 2011-11-17T19:54:08Z by warner

  • Summary changed from Python 3 Support to Python 3 support

comment:11 Changed at 2011-11-23T23:42:40Z by zooko

Here are some notes from Barry Warsaw about how he ported a CPython API module to be Python 3 and also still Python 3 compatible:

http://mail.python.org/pipermail/python-porting/2011-November/000247.html

comment:12 Changed at 2011-12-09T22:50:07Z by zooko

  • Milestone set to 0.6.0

comment:13 Changed at 2012-02-03T21:16:23Z by zooko

  • Milestone 0.6.0 deleted

comment:14 Changed at 2012-08-21T05:26:48Z by zooko

The next step on this is setting up Python 3 on buildslaves, or adding new buildslaves that run Python 3. You can help, by volunteering to operate a Python 3 buildslave.

comment:15 Changed at 2016-10-07T02:01:24Z by bsder

Would like to ping this again. I'm getting some fairly obvious build failures on Python 3. Thanks.

Note: See TracTickets for help on using tickets.