On Dec 3, 2015 1:44 AM, "Miroslav Suchý" <msuchy(a)redhat.com> wrote:
Dne 2.12.2015 v 12:14 Pierre-Yves Chibon napsal(a):
> So what do you folks think?
Copr is already migrated to python3 (in upstream) and I'm getting ready
to use
python3 on production servers soon.
But Copr (frontend and backend) is using Fedora it is no big deal
anyway.
Well we will migrate frontend to python3, backend have to be postponed
since it is
using ansible modules, which are
python2 only.
That shouldn't matter. You just need to have both python 2 and python 3
installed on the box. Ansible doesn't run under mod_wsgi so there is no
conflict at runtime.
Unless you mean you have been using the ansible python module (rather than
the python scripts ansible runs on the remote machines)? If so, two
things.. (1) warning: 2.0 will be out soon and the python module api will
be very different. We don't really support a stable api upstream in that
sense.... just the apis for writing plugins and modules (and some plugin
apis have changed in 2.0 as well. Ansible module api should be almost the
same though.) (2) there's been some work on getting the controller code to
be python 3 compatible but we're a ways off from that (ansible modules much
further than that even). There's some issues about maintaining python 2.4
compat in the controller code we still know needs porting(because that code
also runs on the remote hosts). Help welcomed upstream although we're
currently in the talking phase about that code (I'm planning some
improvements for 2.1 that will make this easier to manage).
Anything new we recently wrote (e.g. keygen) is python3 only. And if
possible run on RHEL7 (again case of keygen).
Sounds like you jumped the gun here since this discussion will
lead to
infra deciding if they want mixed python 3 and python 2 web application
environments :-) but eventually this is inevitable. If not or own
upstream, eventually third party upstream will start to support python 3
only. (As is the current case for maggit).
Conclusion for me - use common sense. Write code python2/3
compatible.
Migrate if possible. If libraries are python2
only (openstack, ansible) notify they owners and wait until there is
python3 version or if those authors refuse, choose
other alternative.
Here we're talking about the case of upstream that only support python 3
and whether we want to take on the maintenance burden (separate systems for
running python2 and python 3 mod_wsgi apps, packaging work) that implies.
-Toshio
-Toshio