Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating non-standard version strings (that do not follow PEP 440) #12012

Closed
uranusjr opened this issue May 3, 2023 · 1 comment
Closed
Labels
type: deprecation Related to deprecation / removal.

Comments

@uranusjr
Copy link
Member

uranusjr commented May 3, 2023

This is a tracking issue containing end-user context feedback. For technical discussions behind the decision to the deprecation, please refer to #11715.


In 23.2, pip is starting to deprecate recognision of non-standard version strings of both installed and discovered (from artifact indexes such as pypi.org) package distributions. The version string format was standardised in PEP 440 (accepted back in 2013), but not enforced due to compatibility concerns. The compatibility layer (called LegacyVersion in the underlying implementation), however, induces various compromises and occassionally user confusions that result in bad interaction.

Ten years later, since most of the packages out there now adhere to the standard, pip maintainers decided that it is now time to formally deprecate this old parsing rule. We recognise there are still packages out there that do not follow the version string standard. Starting from version 23.2, pip emits a deprecation warning for any non-standard version strings for packages that are already installed, or about to be installed into your environment. We encourage you to do

  • If the reported version is old and from a remote source (e.g. PyPI), add a version specifier (e.g. >=) to exclude the old versions.
  • If the reported version is old and already installed, consider upgrade the package to a newer version that is standard-compliant.
  • If the reported version is recent (or latest!), contact the package author to create new a release that complies to the standard.
  • Feel free to comment below to report the issue. We would be happy to hear about environments that are still affected by this legacy issue and help improve the situation.

The deprecated parsing logic is expected to be entirely removed in 24.0. After the release, pip will no longer recognise packages using non-standard versions. This means pip will report those packages as not-installed (even if they are), and sliently ignore releases using non-standard versions.

@uranusjr uranusjr added the type: deprecation Related to deprecation / removal. label May 3, 2023
@pypa pypa locked and limited conversation to collaborators May 4, 2023
@pypa pypa unlocked this conversation Sep 13, 2023
@pypa pypa locked and limited conversation to collaborators Sep 13, 2023
@sbidoul
Copy link
Member

sbidoul commented Sep 29, 2023

I think we can close this one as it was superseded by #12063 (sorry about that @uranusjr I just discovered this issue right now).

@sbidoul sbidoul closed this as completed Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: deprecation Related to deprecation / removal.
Projects
None yet
Development

No branches or pull requests

2 participants