From Fedora Project Wiki

Retire PyO3 v0.19, v0.20, and v0.21

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Summary

The Rust SIG currently maintains five (5) versions of PyO3, the Rust bindings for CPython / PyPy. This proposal is about dropping the three oldest versions (v0.19, v0.20, and v0.21), while keeping the two most recent ones (v0.22, v0.23).

Owner

Current status

  • Targeted release: Fedora Linux 42
  • Last updated: 2025-01-06
  • Announced
  • Discussion thread
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

Old branches of PyO3 are not guaranteed to keep working with newer versions of CPython due to API and / or ABI changes (for interfaces outside the "Limited API"). PyO3 upstream also does not backport bugfixes to older branches - so we cannot maintain old branches of PyO3 downstream indefinitely.

The number of Python packages that depend on these three old versions is already small, and all of them either already have stable releases with support for PyO3 v0.22+, or have pull requests for porting to PyO3 v0.22+ that are being worked on:

Feedback

N/Y

Benefit to Fedora

Dropping support for old versions of PyO3 pushes dependent Python projects to use versions of PyO3 that officially support the latest CPython versions. Ongoing maintenance cost for removed old versions is eliminated, resulting in less work for members of the Rust SIG, and fewer old packages in Fedora.

Scope

  • Proposal owners:

Retire the following packages:

rust-pyo3_0.19
rust-pyo3-build-config0.19
rust-pyo3-ffi0.19
rust-pyo3-macros0.19
rust-pyo3-macros-backend0.19
rust-pyo3_0.20
rust-pyo3-build-config0.20
rust-pyo3-ffi0.20
rust-pyo3-macros0.20
rust-pyo3-macros-backend0.20
rust-pyo3_0.21
rust-pyo3-build-config0.21
rust-pyo3-ffi0.21
rust-pyo3-macros0.21
rust-pyo3-macros-backend0.21

Rust SIG members can provide Pull Requests for updating dependent Python packages to versions that bump the PyO3 dependency to v0.22 or later, or backporting upstream changes if they have not yet been released.

  • Other developers:

Maintainers of affected Python packages (or Python Packagers SIG members) need to update affected packages and / or merge Pull Requests.

  • Release engineering:

N/A

  • Policies and guidelines:

N/A (not needed for this Change)

  • Trademark approval:

N/A (not needed for this Change)

  • Alignment with the Fedora Strategy:

Maybe?

Upgrade/compatibility impact

Native Python extensions built using PyO3 / Rust are statically linked, and do not pull in Rust libraries at install. The packages that are retired as part of this Change are not installed on user systems.

How To Test

Dependent Python packages should continue to work fine when updated and / or built with PyO3 v0.22 or v0.23.

There should be no packages in the Fedora repositories that pull in older versions (v0.21, v0.20, or v0.19).

User Experience

Building these Python extensions with recent versions of PyO3 should improve support for the latest versions of CPython, including official support for Python 3.13+ and / or support for running on a free-threaded Python interpreter.

Dependencies

Affected Python packages:

  • fapolicy-analyzer
  • python-bcrypt
  • python-libcst
  • python-pendulum
  • python-watchfiles

Contingency Plan

  • Contingency mechanism:

If any dependent package cannot be updated and / or ported to use PyO3 v0.22+, the retirement for the respective PyO3 packages can be postponed to a later release of Fedora.

  • Contingency deadline:

Final Freeze.

  • Blocks release?

N/A (not a System Wide Change)

Documentation

Release Notes

The packages for obsolete versions of PyO3 (v0.21, v0.20, and v0.19), the Rust bindings for CPython and PyPy, were removed from Fedora. All Python packages that contain native Python extensions written in Rust are now built with PyO3 v0.22 or later, bringing official support for Python 3.13 and / or support for running on a "free-threaded" Python interpreter.