(Add "Switch to Python 3" template) |
(28 branch is there) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 38: | Line 38: | ||
entirely. | entirely. | ||
It's | It's OK to do this in Rawhide only, however, it would be greatly | ||
appreciated if you could push it to Fedora | appreciated if you could push it to Fedora 28 as well. | ||
If you need more instructions, a guide for porting Python-based RPMs is | |||
available at [2]. | |||
If anything is unclear, or if you need any kind of assistance with the | If anything is unclear, or if you need any kind of assistance with the | ||
porting, you can ask on IRC (#fedora-python on Freenode), or reply here. | porting, you can ask on IRC (#fedora-python on Freenode), or reply here. | ||
Line 49: | Line 51: | ||
[0] https://fedoraproject.org/wiki/Packaging:Python | [0] https://fedoraproject.org/wiki/Packaging:Python | ||
[1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file | [1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file | ||
[2] http://python-rpm-porting.readthedocs.io/ | |||
=== <name>: Switch to Python 3 === | === <name>: Switch to Python 3 === | ||
Line 67: | Line 70: | ||
subpackages -- this is called "Common SRPM" in the guidelines. | subpackages -- this is called "Common SRPM" in the guidelines. | ||
It's | It's OK to do this in Rawhide only, however, it would be greatly | ||
appreciated if you could push it to Fedora | appreciated if you could push it to Fedora 28 as well. | ||
If you need more instructions, a guide for porting Python-based RPMs is | |||
available at [2]. | |||
If anything is unclear, or if you need any kind of assistance with the | If anything is unclear, or if you need any kind of assistance with the | ||
porting, you can ask on IRC (#fedora-python on Freenode), or reply here. | porting, you can ask on IRC (#fedora-python on Freenode), or reply here. | ||
Line 78: | Line 83: | ||
[0] https://fedoraproject.org/wiki/Packaging:Python | [0] https://fedoraproject.org/wiki/Packaging:Python | ||
[1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file | [1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file | ||
[2] http://python-rpm-porting.readthedocs.io/ | |||
=== <name>: Missing "python2-<module>" provide === | === <name>: Missing "python2-<module>" provide === | ||
Line 93: | Line 99: | ||
It's ok to do this in Rawhide only, however, it would be greatly | It's ok to do this in Rawhide only, however, it would be greatly | ||
appreciated if you could push it to Fedora | appreciated if you could push it to Fedora 28 as well. | ||
Line 118: | Line 124: | ||
It's ok to do this in Rawhide only, however, it would be greatly | It's ok to do this in Rawhide only, however, it would be greatly | ||
appreciated if you could push it to Fedora | appreciated if you could push it to Fedora 28 as well. | ||
Line 140: | Line 146: | ||
Please split your package, or remove the stray dependencies. | Please split your package, or remove the stray dependencies. | ||
There is a section on shebangs in the Python RPM Porting Guide [0] | |||
which covers this issue. | |||
It's ok to do this in Rawhide only, however, it would be greatly | It's ok to do this in Rawhide only, however, it would be greatly | ||
appreciated if you could push it to Fedora | appreciated if you could push it to Fedora 28 as well. | ||
Line 148: | Line 156: | ||
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy | ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy | ||
to help investigating or fixing this issue! | to help investigating or fixing this issue! | ||
[0] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#are-shebangs-dragging-you-down-to-python-2 |
Latest revision as of 09:52, 26 February 2018
The Mass bug filing for Python 3 was proposed on the fedora-devel mailing list.
Tracking bug: #1285816
This page has information for those who'd like to file bugs about the Python 3 porting effort.
Summary
According to the Python packaging guidelines, software must be packaged for Python 3 if upstream supports it. Where that's not the case, or where there are some problems with the Python 3 porting, bugs should be filed.
Here are some common problems; bug report text for each one is below.
- No py3 subpackage where upstream supports py3
- No python2-* or python-* Provides
- Requires on both py2 and py3 in one RPM
Bug Titles and Texts
<name>: Provide a Python 3 subpackage
(for libraries)
Upstream, this software supports Python 3. Please provide a Python 3 package for Fedora. According to the Python packaging guidelines [0], software must be packaged for Python 3 if upstream supports it. The guidelines give detailed information on how to do this, and even provide an example spec file [1]. The current best practice is to provide subpackages for the two Python versions (called "Common SRPM" in the guidelines). Alternatively, if nothing depends on your Python2 package, you can just switch to Python 3 entirely. It's OK to do this in Rawhide only, however, it would be greatly appreciated if you could push it to Fedora 28 as well. If you need more instructions, a guide for porting Python-based RPMs is available at [2]. If anything is unclear, or if you need any kind of assistance with the porting, you can ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy to help! [0] https://fedoraproject.org/wiki/Packaging:Python [1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file [2] http://python-rpm-porting.readthedocs.io/
<name>: Switch to Python 3
(for tools)
Upstream, this software supports Python 3. Please provide a Python 3 package for Fedora. According to the Python packaging guidelines [0], software must be packaged for Python 3 if upstream supports it. The guidelines give detailed information on how to do this, and even provide an example spec file [1]. Since users aren't expected to import this tool from Python code, you can just switch to /usr/bin/python3. Alternatively, if you want or need to keep a Python 2 version, the current best practice is to provide subpackages -- this is called "Common SRPM" in the guidelines. It's OK to do this in Rawhide only, however, it would be greatly appreciated if you could push it to Fedora 28 as well. If you need more instructions, a guide for porting Python-based RPMs is available at [2]. If anything is unclear, or if you need any kind of assistance with the porting, you can ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy to help! [0] https://fedoraproject.org/wiki/Packaging:Python [1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file [2] http://python-rpm-porting.readthedocs.io/
<name>: Missing "python2-<module>" provide
This package does not provide "python2-<module>". As per Python packaging guidelines [0], when there are two versions of module "foo", the two packages must provide: "python3-foo" for Python 3 "python2-foo" for Python 2 "python-foo" for the system default Python (currently 2, but this might change in the future) Please use the %python_provide macro [1] to specify the correct provides. It's ok to do this in Rawhide only, however, it would be greatly appreciated if you could push it to Fedora 28 as well. If anything is unclear, or if you need any kind of assistance with this issue, you can ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy to help! [0] https://fedoraproject.org/wiki/Packaging:Python [1] https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro
<name>: Missing "python-<module>" provide
This package does not provide "python-<module>". As per Python packaging guidelines [0], when there are two versions of module "foo", the two packages must provide: "python3-foo" for Python 3 "python2-foo" for Python 2 "python-foo" for the system default Python (currently 2, but this might change in the future) Please use the %python_provide macro [1] to specify the correct provides. It's ok to do this in Rawhide only, however, it would be greatly appreciated if you could push it to Fedora 28 as well. If anything is unclear, or if you need any kind of assistance with this issue, you can ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy to help! [0] https://fedoraproject.org/wiki/Packaging:Python [1] https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro
<name>: <RPM_name> requires both Python 2 and Python 3
The <RPM_name> RPM requires both Python 2 and Python 3. Except in very special circumstances, there is no need for one package to drag in both Python stacks. Usually, this is a packaging error: for example, a stray "/usr/bin/python" shebang in a Python 3 package can introduce a Python 2 dependency. Please split your package, or remove the stray dependencies. There is a section on shebangs in the Python RPM Porting Guide [0] which covers this issue. It's ok to do this in Rawhide only, however, it would be greatly appreciated if you could push it to Fedora 28 as well. If anything is unclear, or if you need any kind of assistance, you can ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy to help investigating or fixing this issue! [0] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#are-shebangs-dragging-you-down-to-python-2