Announcement: packaging 26.0rc1 released!

On behalf of the packaging maintainers, I’d like to announce packaging 26.0rc1 is out! This is a major release with lots of work on performance, support for PEP 751 (pylock) and PEP 794 (import name metadata), support for writing metadata files, updates to edge cases in handling versions, a collection of fixes including handling markers, and lots more infrastructure updates, like trusted publishing.

To read more about the performance work, and see lots of plots, I wrote a post on it: https://iscinumpy.dev/post/packaging-faster

For the release notes: Release 26.0rc1 · pypa/packaging · GitHub

Please try it out before the final release, which should be in about a week assuming no blockers.

14 Likes

I want to add this fixes a long standing bug in packaging which is when only a pre-release version is available given a specifier it should be selected.

For example, as of today packaging 26.0rc1 is the only version of packaging that matches packaging > 25, but in pip 25.3 you get this error:

$ pip install "packaging > 25"
ERROR: Ignored the following yanked versions: 20.6
ERROR: Could not find a version that satisfies the requirement packaging>25 (from versions: 14.0, 14.1, 14.2, 14.3, 14.4, 14.5, 15.0, 15.1, 15.2, 15.3, 16.0, 16.1, 16.2, 16.3, 16.4, 16.5, 16.6, 16.7, 16.8, 17.0, 17.1, 18.0, 19.0, 19.1, 19.2, 20.0, 20.1, 20.2, 20.3, 20.4, 20.5, 20.7, 20.8, 20.9, 21.0, 21.1, 21.2, 21.3, 22.0, 23.0, 23.1, 23.2, 24.0, 24.1, 24.2, 25.0, 26.0rc1)
ERROR: No matching distribution found for packaging>25

But assuming this makes it in pip 26.0 (which unless some big problem is discovered is very likely) this will happen:

$ pip install "packaging > 25"
Collecting packaging>25
  Using cached packaging-26.0rc1-py3-none-any.whl.metadata (3.3 kB)
Using cached packaging-26.0rc1-py3-none-any.whl (74 kB)
Installing collected packages: packaging
Successfully installed packaging-26.0rc1

Also, I have a PR which should be ready for 26.0 that allows you to explicitly opt-out or in to pre-releases on a per-package basis: Final and prerelease control for package selection by notatallshaw · Pull Request #13647 · pypa/pip · GitHub

This will conclude my query on the thread I started just over 2 years ago stating my confusion of how pre-releases should work in complex situations: Handling of Pre-Releases when backtracking?

5 Likes

Packaging 26.0 is out!

I’ve also updated my post with the 26.0 plots, including benchmarks for all supported Python versions.

8 Likes