Hi Michal, On 2013-04-12 14:30:42 +0200, Michal Vyskocil wrote:
my hackweek project was to port osc to Python3. The goal has been achived, I've a series of around 20 patches changing the codebase of osc to be compatible with python 2.6, 2.7 and 3.3. That means all test have passed in both three languages on the same codebase.
That sounds great!:)
However the M2Crypto does not have a python3 port. I've spent one day with a porting effort, but I've realized there is already some initial work done by RedHat guys at
https://bugzilla.osafoundation.org/show_bug.cgi?id=12853
so I will need to compare mcepl's branch with my patchset first.
For now this would only be an issue for python3 users.
For that reason I am reluctant to issue a pull request for a code, which was not (and can't properly be) tested in a real world.
Hmm well as long as your patches work with python 2.6 and 2.7 I'm fine with it. Even if M2Crypto doesn't work with python3 yet it's still a big improvement IMHO.
The downside is the code does not run on python 2.5 and olders. Speaking in a terms of a distributions, the following ones will become incompatible with the new code - Centos 5, Debian 5.0, RHEL 4, RHEL 5, SLE10. Not sure about Ubuntu 9 - it have 2.5 at least.
However all targets are quite old and mostly without a general support available, therefor I'd say they can be turned off and we can agree that python 2.6 is the lowest supported Python version in current osc codebase.
+1
So should I made a pull request adding python3 support?
I don't have any strong objection against it (except that there's no "print" statement anymore but that's not your fault:) - so hopefully I'll quickly get used to the new syntax...). If anyone else has objections please raise your voice:)
BTW: patches are ftp://ftp.suse.com/pub/people/mvyskocil/osc3/, if you want to take a look before a pull request. They use some runtime quirks to stay compatible, but the biggest change is -print.patch, which is done by 2to3 as a mostly mechanical change.
I just had a very quick glance at your patches so I don't have many comments yet. 0009-python3-compatibility-use-relative-imports.patch: I'm not sure if this is a good idea at least PEP8 [1] discourages the use of relative imports but I'll need to check if that's still true for recent python versions... Anyway thanks a lot for your work! Marcus [1] http://www.python.org/dev/peps/pep-0008/#imports -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org