From Fedora Project Wiki
(s/Fedora 24/Fedora 25/ after branching)
(28 branch is there)
 
(One intermediate revision by the same user not shown)
Line 39: Line 39:
   
   
  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 25 as well.
  appreciated if you could push it to Fedora 28 as well.
   
   
   
   
Line 71: Line 71:
   
   
  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 25 as well.
  appreciated if you could push it to Fedora 28 as well.
   
   
   
   
Line 99: 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 25 as well.
  appreciated if you could push it to Fedora 28 as well.
   
   
   
   
Line 124: 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 25 as well.
  appreciated if you could push it to Fedora 28 as well.
   
   
   
   
Line 150: Line 150:
   
   
  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 25 as well.
  appreciated if you could push it to Fedora 28 as well.
   
   
   
   

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