From Fedora Project Wiki
(Name, summary, owner, targeted release)
(Detailed Description)
Line 46: Line 46:
== Detailed Description ==
== Detailed Description ==
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
This change is only about about automatic RPM provides in the following forms:
* `python3dist(NAME)`
* `python3.Xdist(NAME)`
It does not affect any other provides or package names.
Historically, Python package names were normalized by the RPM dependency generators in a way that diverged from upstream behavior. In upstream (e.g. when using `pip`) a package name with a dot is equal to a package name with a dash (e.g. `pip install ruamel.yaml` and `pip install ruamel-yaml` are equivalent). In Fedora, the ''Provides'' and ''Requires'' included the dot, but upstream rules defined in [https://www.python.org/dev/peps/pep-0503/#normalized-names PEP 503] demand the dot to be replaced by a dash. This caused trouble when other packages required the packages via a name with a dash. Hence, we have slowly been migrating to PEP 503 name normalization.
* Since Fedora 32, Python dependency generators have generated both variants of the ''Provides'' as a preparation for the transition to PEP 503-only.
* Since Fedora 33, Python dependency generators have generated ''Requires'' in the PEP 503 form (no dots).
* Only packages with manual ''BuildRequires'', ''Requires'', ''Recommends'' etc. with requirements such as `python3dist(foo.bar)` would be affected by this change. We have fixed all of them in Fedora 36.
Hence, together with [[Changes/Python3.11|the update to Python3.11]], we will disable the legacy form of the provides.
Python packages with dots in their name will only provide the names with dashes.
=== RHEL/EPEL compatibility ===
This change is fully compatible with RHEL/EPEL 9, which behaves like Fedora 34 and hence has ''Provides'' in both forms but ''Requires'' in the PEP 503 form (no dots).
This change is not compatible with RHEL/EPEL 8. If you need to have manual requirements in the specfile that should work on Fedora 37+ and RHEL/EPEL 8 in this form and the name includes a dot, we recommend using [https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#py3_dist `%py3_dsit`].
This change is not relevant to RHEL 7.
This change is not compatible with EPEL 7. If you need to have manual requirements in the specfile that should work on Fedora 37+ and RHEL/EPEL 7 in this form and the name includes a dot, we recommend using [https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#py3_dist `%py3_dsit`].


== Feedback ==
== Feedback ==

Revision as of 17:20, 21 January 2022


Python Dist provides to only provide PEP503-complaint names

Summary

The legacy python3dist(NAME) and python3.11dist(NAME) RPM provides with dots (.) in NAME will no longer be automatically provided. NAME will only be normalized according to PEP 503. E.g. on Fedora 36 a package provides both python3dist(ruamel-yaml) and python3dist(ruamel.yaml), on Fedora 37+ it will only provide python3dist(ruamel-yaml) (and similarly, python3.11dist(ruamel-yaml).

Owner


Current status

  • Targeted release: Fedora Linux 37
  • Last updated: 2022-01-21
  • 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

This change is only about about automatic RPM provides in the following forms:

  • python3dist(NAME)
  • python3.Xdist(NAME)


It does not affect any other provides or package names.

Historically, Python package names were normalized by the RPM dependency generators in a way that diverged from upstream behavior. In upstream (e.g. when using pip) a package name with a dot is equal to a package name with a dash (e.g. pip install ruamel.yaml and pip install ruamel-yaml are equivalent). In Fedora, the Provides and Requires included the dot, but upstream rules defined in PEP 503 demand the dot to be replaced by a dash. This caused trouble when other packages required the packages via a name with a dash. Hence, we have slowly been migrating to PEP 503 name normalization.

  • Since Fedora 32, Python dependency generators have generated both variants of the Provides as a preparation for the transition to PEP 503-only.
  • Since Fedora 33, Python dependency generators have generated Requires in the PEP 503 form (no dots).
  • Only packages with manual BuildRequires, Requires, Recommends etc. with requirements such as python3dist(foo.bar) would be affected by this change. We have fixed all of them in Fedora 36.


Hence, together with the update to Python3.11, we will disable the legacy form of the provides.

Python packages with dots in their name will only provide the names with dashes.

RHEL/EPEL compatibility

This change is fully compatible with RHEL/EPEL 9, which behaves like Fedora 34 and hence has Provides in both forms but Requires in the PEP 503 form (no dots).

This change is not compatible with RHEL/EPEL 8. If you need to have manual requirements in the specfile that should work on Fedora 37+ and RHEL/EPEL 8 in this form and the name includes a dot, we recommend using %py3_dsit.

This change is not relevant to RHEL 7.

This change is not compatible with EPEL 7. If you need to have manual requirements in the specfile that should work on Fedora 37+ and RHEL/EPEL 7 in this form and the name includes a dot, we recommend using %py3_dsit.

Feedback

Benefit to Fedora

Scope

  • Proposal owners:
  • Other developers:
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

How To Test

User Experience

Dependencies

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No


Documentation

N/A (not a System Wide Change)

Release Notes