From Fedora Project Wiki
(9 intermediate revisions by 3 users not shown)
Line 24: Line 24:


== Summary ==
== Summary ==
Update the Python stack in Fedora from Python 3.9 to Python 3.10.
Update the Python stack in Fedora from Python 3.9 to Python 3.10, the newest major release of the Python programming language.


== Owner ==
== Owner ==
Line 46: Line 46:


== Current status ==
== Current status ==
[[Category:ChangeAcceptedF35]]
* Targeted release: [[Releases/35 | Fedora 35 ]]  
* Targeted release: [[Releases/35 | Fedora 35 ]]  
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}  
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}  
Line 55: Line 56:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* Tracker bug: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2494 #2494]
* Release notes tracker: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1890881 #1890881]
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/603 #603]


== Detailed Description ==
== Detailed Description ==
Line 83: Line 85:
* 2021-05-25: Python 3.10.0 beta 2
* 2021-05-25: Python 3.10.0 beta 2
** The ideal point when we can start rebuilding in Koji
** The ideal point when we can start rebuilding in Koji
* 2021-05-29: Expected side tag-merge (optimistic)
* 2021-05-31: Expected side tag-merge (optimistic)
* 2021-06-17: Python 3.10.0 beta 3
* 2021-06-17: Python 3.10.0 beta 3
* 2021-06-17: Expected side tag-merge (realistic)
* 2021-06-25: Expected side tag-merge (realistic)
* 2021-07-10: Python 3.10.0 beta 4
* 2021-07-10: Python 3.10.0 beta 4
* 2021-07-17: Expected side tag-merge (pessimistic)
* 2021-07-17: Expected side tag-merge (pessimistic)
Line 108: Line 110:




(From [https://www.python.org/dev/peps/pep-0619/#id5 Python 3.10 Release Schedule] and [https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html Fedora 35 Release Schedule].)
(From [https://www.python.org/dev/peps/pep-0619/#schedule Python 3.10 Release Schedule] and [https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html Fedora 35 Release Schedule].)


The schedule might appear somewhat tight for Fedora 35, but Python's [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/AKA3USBKFYKUQDSGDK4FNDYYWMKM7XKX/ annual release cycle was adapted for Fedora] and this worked fine for Python 3.9 and Fedora 33. It is now common that Python is upgraded on a similar schedule in every odd-numbered Fedora release.
The schedule might appear somewhat tight for Fedora 35, but Python's [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/AKA3USBKFYKUQDSGDK4FNDYYWMKM7XKX/ annual release cycle was adapted for Fedora] and this worked fine for Python 3.9 and Fedora 33. It is now common that Python is upgraded on a similar schedule in every odd-numbered Fedora release.
Line 141: Line 143:
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->


* Release engineering: TODO open new ticket <!-- REQUIRED FOR SYSTEM WIDE AS WELL AS FOR SELF CONTAINED CHANGES --> A targeted rebuild for all python packages will be required, before the mass rebuild.
* Release engineering: [https://pagure.io/releng/issue/9810 #9810] <!-- REQUIRED FOR SYSTEM WIDE AS WELL AS FOR SELF CONTAINED CHANGES --> A targeted rebuild for all python packages will be required, before the mass rebuild.
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.  
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.  
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing, and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing, and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
Line 192: Line 194:
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
4000+ packages depend on Python 3 and ~3400 packages need rebuilding when Python is upgraded. See scope section.
4000+ packages depend on Python 3 and ~3400 packages need rebuilding when Python is upgraded. See scope section.
Some Python version globs in the spec files, such as `?.?`, need to be updated, see:
* [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/PQIGCQCRNBYNXBX2ICWEM3PLDLNOG2ZT/ Mass spec change: Replace Python version globs with macros to support 3.10]
* [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/MRXIMUT2X54DUZNIFLYKCNI4SW5N22IL/ Mass spec change: Replace Python 3 version globs (3.?) with macros to support 3.10]


== Contingency Plan ==
== Contingency Plan ==
Line 224: Line 231:
* Migrating user installed packages - https://pagure.io/fedora-docs/release-notes/issue/503
* Migrating user installed packages - https://pagure.io/fedora-docs/release-notes/issue/503


[[Category:ChangePageIncomplete]]
 
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->

Revision as of 23:52, 3 November 2020


Python 3.10

Summary

Update the Python stack in Fedora from Python 3.9 to Python 3.10, the newest major release of the Python programming language.

Owner

  • Email: python-maint@redhat.com
  • Release notes owner:

Current status

Detailed Description

We would like to upgrade Python to 3.10 in Fedora 35 thus we are proposing this plan early.

See the upstream notes at Features for 3.10 and What's new in 3.10.

Important dates and plan

  • 2020-05-18: Python 3.10 development begins
  • 2020-10-05: Python 3.10.0 alpha 1
    • Package it as Package-x-generic-16.pngpython3.10 for testing purposes
    • Start the bootstrap procedure in Copr
    • Do a mass rebuild against every future release in Copr
  • 2020-11-02: Python 3.10.0 alpha 2
  • 2020-12-07: Python 3.10.0 alpha 3
  • 2021-01-04: Python 3.10.0 alpha 4
  • 2021-02-01: Python 3.10.0 alpha 5
  • 2021-02-09: Branch Fedora 34, Rawhide becomes future Fedora 35
    • The earliest point when we can start rebuilding in Koji side-tag
  • 2021-03-01: Python 3.10.0 alpha 6
  • 2021-04-05: Python 3.10.0 alpha 7
  • 2021-05-03: Python 3.10.0 beta 1
    • No new features beyond this point
  • 2021-05-25: Python 3.10.0 beta 2
    • The ideal point when we can start rebuilding in Koji
  • 2021-05-31: Expected side tag-merge (optimistic)
  • 2021-06-17: Python 3.10.0 beta 3
  • 2021-06-25: Expected side tag-merge (realistic)
  • 2021-07-10: Python 3.10.0 beta 4
  • 2021-07-17: Expected side tag-merge (pessimistic)
  • 2021-07-21: Fedora 35 Mass Rebuild
    • The mass rebuild happens with fourth beta. We might need to rebuild Python packages later in exceptional case.
    • If the Koji side-tag is not merged yet at this point, we defer the change to Fedora 36.
  • 2021-08-02: Python 3.10.0 candidate 1
    • This serves as "final" for our purposes.
  • 2021-08-10: Branch Fedora 35, Rawhide becomes future Fedora 36
  • 2021-08-10: Fedora 33 Change Checkpoint: Completion deadline (testable)
  • 2021-08-24: Fedora Beta Freeze
    • If rebuild with 3.10.0rc1 is needed, we should strive to do it before the freeze - there is a window of 3 weeks.
  • 2021-09-06: Python 3.10.0 candidate 2
  • 2021-09-19: Fedora 35 Beta Release (Preferred Target)
    • Beta will likely be released with 3.10.0rc2.
  • 2021-09-21: Fedora 35 Beta Target date #1
  • 2021-10-04: Python 3.10.0 final
  • 2021-10-05: Fedora 35 Final Freeze
    • We'll update to 3.10.0 final using a freeze exception.
  • 2021-10-19: Fedora 35 Preferred Final Target date
  • 2021-10-26: Fedora 35 Final Target date #1


(From Python 3.10 Release Schedule and Fedora 35 Release Schedule.)

The schedule might appear somewhat tight for Fedora 35, but Python's annual release cycle was adapted for Fedora and this worked fine for Python 3.9 and Fedora 33. It is now common that Python is upgraded on a similar schedule in every odd-numbered Fedora release.

Note that upstream's "release candidates" are frozen except for blocker bugs. Since we can and will backport blocker fixes between Fedora and upstream, we essentially treat the Release Candidate as the final release.

Notes from the previous upgrade

There are notes from the previous upgrade available, so this upgrade may go smoother: SIGs/Python/UpgradingPython

Benefit to Fedora

Fedora aims to showcase the latest in free and open source software - we should have the most recent release of Python 3. Packages in Fedora can use the new features from 3.10.

There's also a benefit to the larger Python ecosystem: by building Fedora's packages against 3.0 while it's still in development, we can catch critical bugs before the final 3.10.0 release.

Scope

We will coordinate the work in a side tag and merge when ready.

  • Proposal owners:
    1. Introduce Package-x-generic-16.pngpython3.10 for all Fedoras
    2. Prepare stuff in Copr as explained in description.
    3. Update Package-x-generic-16.pngpython-rpm-macros so Package-x-generic-16.pngpython3.10 builds Package-x-generic-16.pngpython3
    4. Build Package-x-generic-16.pngpython3.10 as the main Python
    5. Mass rebuild all the packages that runtime require python(abi) = 3.9 and/or libpython3.9.so.1.0 (~3400 known packages in October 2020)
    6. Build Package-x-generic-16.pngpython3.9 as a non-main Python
  • Other developers: Maintainers of packages that fail to rebuild during the rebuilds will be asked, using e-mail and bugzilla, to fix or remove their packages from the distribution. If any issues appear, they should be solvable either by communicating with the respective upstreams first and/or applying downstream patches. Also the package maintainers should have a look at: Porting to Python 3.10. The python-maint team will be available to help with fixing issues.
  • Release engineering: #9810 A targeted rebuild for all python packages will be required, before the mass rebuild.
  • Policies and guidelines: nope
  • Trademark approval: nope

Upgrade/compatibility impact

All the packages that depend on Python 3 must be rebuilt. User written Python 3 scripts/applications may require a small amount of porting, but mostly Python 3.9 is forward compatible with Python 3.10.

How To Test

Interested testers do not need special hardware. If you have a favorite Python 3 script, module, or application, please test it with Python 3.10 and verify that it still works as you would expect. If the application you are testing does not require any other modules, you can test it using Package-x-generic-16.pngpython3.10 even before this change is implemented, in Fedora 32, 33 or 34.

In case your application requires other modules, or if you are testing an rpm package, it is necessary to install the 3.10 version of the python3 rpm. Right now that rpm is available in copr, along with all other python packages that build successfully with python 3.10. See https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ for detailed instructions how to enable Python 3.10 copr for mock.

Once the change is in place, test if you favorite Python apps are working as they were before. File bugs if they don't.

User Experience

Regular distro users shouldn't notice any change in system behavior other than the Python 3 interpreter will be in version 3.10.

Dependencies

4000+ packages depend on Python 3 and ~3400 packages need rebuilding when Python is upgraded. See scope section.

Some Python version globs in the spec files, such as ?.?, need to be updated, see:

Contingency Plan

  • Contingency mechanism: Do not merge the side tag with rawhide. If the side tag has been merged and issues arise, that will justify a downgrade, then use an epoch tag to revert to 3.9 version (never needed before)
  • Contingency deadline: TBD
  • Blocks release? Yes, we'd like to block Fedora 35 release on at least 3.10.0rc1
  • Blocks product? See above

Documentation

Python 3.10 Release Schedule

Features for 3.10

What's new in 3.10

Porting to Python 3.10

Release Notes