Re: Filing Bugs for Python 3 Switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/28/2015 06:08 PM, Dan Williams wrote:
On Wed, 2015-01-28 at 11:09 -0500, Bohuslav Kabrda wrote:
Hi,
I just filed 2 bugs [A], [B] for the Python 3 switch [C] and I realized that I should probably follow the mass bug filing policy.
As I've said previously, we've already had both Python 2 and Python 3 on LiveCDs for few releases, so it makes sense to move as much as possible to Python 3. My intention is to mass file bugs only for "applications" (see the second item in second list at [D]) - in short, these are packages for which it doesn't make sense to introduce python3- subpackage, but it only makes sense to rebuild them with Python 3.
The mass bug filing policy suggests providing text of the bug for review, so here it is:


Since your package requires Python and is considered an application as per [1], I'd like to ask you to rebuild it with Python 3. Please see recommendations and notes at [2]. Note: this switch should only be done assuming you need to do none or very little downstream patching of upstream source. If upstream source doesn't work with Python 3, it's ok to stay with Python 2.

Some general notes:
If your package depends on Python because of a Python script that has /usr/bin/python in hashbang, you need to change this to /usr/bin/python3. All "Requires" and "BuildRequires" on Python extension modules have to be changed from "python-foo" to "python3-foo" in order for this change to work. If your package is an "application" (let's call it "foo") and it also generates a subpackage with Python bindings (i.e. "python-foo" or "foo-python"), you should provide a python3 subpackage ("python3-foo" or "foo-python3") and use that as dependency of other subpackages.

How about "#!/usr/bin/env python"?  I don't recall who suggested this a
long time ago, but I'm 99% sure it was to better handle python3...

That does *not* handle Python 3 for you. In Fedora 22, /usr/bin/python will still point to Python 2 [0], so this would (normally) still call Python 2.

What /usr/bin/env does is take $PATH into account – for example if you have a virtualenv activated, it would use the python from that virtualenv. For applications that are installed as part of the system, this is almost never what you want.


[0] http://fedoraproject.org/wiki/Changes/Python_3_as_Default#User_Experience

--
Petr Viktorin

--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux