Hi, we would like to use Python 3 on the default installation instead of Python 2 on Fedora 22.
While this package is not in minimal buildroot, it belongs to fedora-packager stack. We would like to switch to Python 3 there as well.
The goal here is, that for F22 you should use Python 3 instead of Python 2 in this package.
Please, help us update to Python 3 flawlessly.
Check if upstream already support Python 3, if yes, use it and add the support to the package.
If upstream doesn't support Python 3 yet, encourage it to do so by sending patches and offering your help.
When upstream is dead or unwilling to support Python 3, say so and we can solve the problem together.
Chances are, that you ARE the upstream. In that case, everything is easier, just do it yourself.
There is a table on wiki, that should list your package. Chances are, that you can see an upstream link that covers the problem. Anyway, please update the table with information you know.
I offer my help with this task, so if you have no idea, how to work on this, or it is just not your priority, don't hesitate to ask for help.
(As you've already realized, this is a bulk text, so if something is not quite exact about your package, sorry for that, just ask)
Interesting. I started looking at what it would take to port mock to python3 last week and now I actually have a request for it :)
I created a work-python3 branch in my local git tree, ran 2to3 over the mock directory and then started looking at the changes.
So far I have two things that are show-stoppers:
1. Figuring out how to tell rpm to use python3 to byte-compile modules when packaging.
2. Translating the trace_decorator code.
I'm sure more things will crop up as we move forward.
The question is, should we try and maintain 2 and 3 simultaneously or should we do a cut-over to 3 at some point?
I believe that RPM bytecompiles python3 modules by default, see for example this log:
(search for byte-compiling)
I think that dropping Python 2 support is not yet a very good idea for systems with doesn't offer Python 3, such as RHEL/CentOS.
It's relatively easy to keep one code working with Pythons 2.6, 2.7 and 3.3.
This is a very good text about it:
Thanks to msimacek work, mock and mockchain are python3 ready.
If you change
in both scripts to
it will work.
I do not want to change it for current RHELs and stable Fedora and F21, which is just before release.
I changed those shebang by sed in spec file for F22. Commit e75d55b.
However there is one problem. There is no lvm2-python3-libs yet (see bug 1136366).
Therefore build of mock-lvm subpackage is temporary disabled for F22. I hope I can enable it before we cut next release.
By curiosity, from which version of mock is the API compatible py3 ?
mock-1.2.0 is the first version which works under python3
rawhide version of mock now run under python3