From Fedora Project Wiki

< SIGs‎ | Python

Fedora downstream patches are tracked in the page: Python Patches. This page gives the status of the downstream patches currently maintained in the latest Python package of Fedora.

Fedora downstream patches

00001-rpath.patch

"Fixup distutils/unixccompiler.py to remove standard library path from rpath"

=> Can be removed, but blocked by a Fedora change.

=> Covered by this Fedora 35 change: https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild

This patch is basically useless, but removing it would require to ensure that no Fedora package use rpath. See: https://pagure.io/packaging-committee/issue/886

Distutils is deprecated in Python 3.10 and will be removed in Python 3.12. Removing the patch breaks numpy, so the patch is kept for now, we will watch how numpy deals with distutils deprecation/removal.

See also: https://bugs.python.org/issue36659#msg340731

Added by: https://src.fedoraproject.org/rpms/python/c/f5df1f834310948b32407933e3b8713e1121105b (2010-03-16)

00251-change-user-install-location.patch

"Change user install location to /usr/local if executable is /usr/bin/python* and RPM build is not detected to make pip and distutils install into separate location."

=> Should be proposed upstream as a configure option.

https://github.com/python/cpython/pull/25718 proposes a long term solution to give Linux distributions a way to customize sysconfig "schemes".

Added by: https://src.fedoraproject.org/rpms/python3/c/332b947dfc8d0f0d3a4525864b121d0f239beb4d (2017-06-26)

See also https://bugzilla.redhat.com/show_bug.cgi?id=2026979

00328-pyc-timestamp-invalidation-mode.patch

"Restore pyc to TIMESTAMP invalidation mode as default in rpmbuild"

=> downstream only patch

Patch related to PEP 552: Deterministic pycs implemented in Python 3.7.

Merged upstream

Made upstream by Victor Stinner:

Other:

00274-fix-arch-names

00274-fix-arch-names.patch was removed: archicteture names are now renamed in python3.10.spec:

 # We use the upstream arch triplets, we convert them from %%{_arch}-linux%%{_gnu}
 %global platform_triplet %{expand:%(echo %{_arch}-linux%{_gnu} | sed -E \\
     -e 's/^arm(eb)?-linux-gnueabi$/arm\\1-linux-gnueabihf/' \\
     -e 's/^mips64(el)?-linux-gnu$/mips64\\1-linux-gnuabi64/' \\
     -e 's/^ppc(64)?(le)?-linux-gnu$/powerpc\\1\\2-linux-gnu/')}

History

  • python3.10:
    • 2021-02-16: 4 patches (Python 3.10.0a5)
  • python39:
    • 2020-03-05: 7 patches (Python 3.9.0a4)
    • 2020-02-17: 9 patches but 2 are backports (340 and 341), can be removed from next Python 3.9.0a4
  • python38:
    • 2019-06-19: 8 patches
    • 2019-04-23: 9 patches
    • 2019-02-07: 12 patches
    • 2018-11-08: 20 patches
  • python3 (currently Python 3.7):
    • 2019-04-02: 11 patches
    • 2019-03-07: 15 patches
    • 2018-07-12: 18 patches
    • 2018-05-10: 15 patches
  • python2 (Python 2.7):
    • 2019-05-17: 53 patches
    • 2019-03-07: 55 patches

Count patches::

   $ ls *.patch|wc -l
   55
   $ grep -c '^Patch[0-9]\+:' python*.spec
   55