What changed in packaging from 25 to 26
4 releases numbered after 25.0 up to and including 26.3, stable releases only. 25.0 and 26.3 are the newest stable releases of 25 and 26 we track; this page follows them as new ones ship.
- 1 removes or deprecates something
69 changes across 4 releases
- Add a public VersionRange API and SpecifierSet.to_range(), representing the versions a specifier set accepts as an interval set that supports intersection, union, difference, complement, set relations, membership tests, and filtering
- Add VersionRange.to_specifier_set() to convert a range back to a SpecifierSet where a PEP 440 form exists
- Accept Metadata-Version: 2.6 per PEP 808
- Add a limit argument to parse_tag() for compressed tag sets
- Add a prefer_sdist_predicate argument to Pylock.select() to prefer source distributions over wheels for selected packages
- Add pure_python_tags() to generate the pure-Python tags for a Python version without touching the running platform
- Add SpecifierSet.is_subset(), SpecifierSet.is_superset(), and SpecifierSet.is_disjoint() to compare the versions two specifier sets accept
- Add handling for Emscripten wheel tags per PEP 783
- Add handling for the abi3.abi3t free-threading tag per PEP 803
- Add packaging.dependency_groups module based on PEP 723
- Add the packaging.direct_url module
- Add the packaging.errors module
- Add SpecifierSet.is_unsatisfiable using ranges
- Add create_compatible_tags_selector to select compatible tags
- Add a key argument to SpecifierSet.filter()
- Support & and | operators for Marker objects
- Add Version.from_parts and normalize Version.__replace__
- Add an option to validate compressed tag set sort order in parse_wheel_filename
- Add pylock select function for PEP 751
- Add filename property to PackageSdist and PackageWheel
- Support PEP 751 for pylock
- Support PEP 794 import name metadata
- Support writing metadata
- Support __replace__ for Version
- Support positional pattern matching for Version and Specifier
- Prefer native linux_* platform tags over manylinux and musllinux tags on Linux
- Narrow exclusion of pre-releases for <V.postN to match spec
- Narrow exclusion of post-releases for >V to match spec
- Rename format_full_version to _format_full_version to make it visibly private
- Restrict local version to ASCII
- Give preference to path over url in pylock
- Adjust PEP 440 handling of prereleases for Specifier.contains, SpecifierSet.contains, and SpecifierSet.filter
- Handle PEP 440 edge case in SpecifierSet.filter
- Adjust arbitrary equality intersection preservation in SpecifierSet
- Return False instead of raising for .contains with invalid version
- Support arbitrary equality on arbitrary strings for Specifier and SpecifierSet's filter and contains methods
- Only try to parse as Version on certain marker keys, return False on unequal ordered comparisons
- Raise InvalidVersion instead of TypeError when Version is given a non-string
- Raise InvalidVersion for non-string pre-release letters passed to Version.from_parts
- Fix an AttributeError when hashing internally trimmed versions
- Fix SpecifierSet.is_unsatisfiable for post-release boundary intersections
- Make Requirement.__hash__ consistent with __eq__ for trailing-zero-equivalent specifiers so equal requirements hash equal and deduplicate in sets and dicts
- Normalize requested extra names before comparing or hashing requirements
- Preserve a Requirement's specifier prereleases override across a pickle round trip
- Raise InvalidRequirement instead of InvalidSpecifier when a requirement contains an invalid specifier
- Clarify the error for post-release prefix wildcards like ==1.0.post1.*
- Preserve quoting semantics when serializing marker values so round-tripped markers parse back to the same marker
- Keep the parentheses of a nested group when serializing markers
- Normalize extra and dependency_groups values in nested markers at parse time
- Fix incorrect sysconfig var name for pyemscripten
- Make Version, Specifier, SpecifierSet, Tag, Marker, and Requirement pickle-safe and backward-compatible with pickles created in 25.0-26.1 including references to the removed packaging._structures module
- Re-export ExceptionGroup for now
- Fix > comparison for versions with dev+local segments
- Fix incorrect self-comparison for InfinityType and NegativeInfinityType
- Canonicalize when deduplicating specifiers in SpecifierSet
- Fix charset error message formatting
- Handle the key parameter in SpecifierSet.filter when specifiers are empty and prerelease is False
- Specifier === uses original string, not normalized, when available
- Propagate int-max-str-digits ValueError
- Update _hash when unpickling Tag()
- Correct comment and simplify implicit prerelease handling in Specifier.prereleases
- Use explicit _GLibCVersion NamedTuple in _manylinux
- Detect invalid license expressions containing ()
- Correct regex for metadata 'name' format
- Improve the message around expecting a semicolon
- Support nested parens in license expressions
- Add space before at symbol in Requirements string
- Use packaging logger instead of root logger
- Drop support for Python 3.8; packaging now requires Python 3.9 or later
Original release notes, newest first
The list above is our reading of these notes; the originals from packaging are here, one fold per release.
26.3
What's Changed
Features
- Add a public
VersionRangeAPI andSpecifierSet.to_range(), representing the versions a specifier set accepts as an interval set that supports intersection, union, difference, complement, set relations, membership tests, and filtering.VersionRange.to_specifier_set()converts a range back to aSpecifierSetwhere a PEP 440 form exists. (#1267, #1270, #1298) - PEP 808: accept
Metadata-Version: 2.6. (#1194) - Add a
limitargument toparse_tag()for compressed tag sets. (#1220) - Add a
prefer_sdist_predicateargument toPylock.select()to prefer source distributions over wheels for selected packages. (#1334) - Add
pure_python_tags()to generate the pure-Python tags for a Python version without touching the running platform. (#1346) - Add
SpecifierSet.is_subset(),SpecifierSet.is_superset(), andSpecifierSet.is_disjoint(), which compare the versions two specifier sets accept. (#1313)
Behavior adaptations
- Drop support for Python 3.8; packaging now requires Python 3.9 or later. (#1157)
- Prefer native
linux_*platform tags overmanylinuxandmusllinuxtags on Linux. (#160)
Fixes for versions and specifiers
- Raise
InvalidVersioninstead ofTypeErrorwhenVersionis given a non-string. (#1319) - Raise
InvalidVersionfor non-string pre-release letters passed toVersion.from_parts. (#1241) - Fix an
AttributeErrorwhen hashing internally trimmed versions. (#1242) - Fix
SpecifierSet.is_unsatisfiablefor post-release boundary intersections. (#1257)
Fixes for requirements and markers
- Make
Requirement.__hash__consistent with__eq__for trailing-zero-equivalent specifiers (e.g.foo==1.0.0andfoo==1.0.0.0), so equal requirements hash equal and deduplicate in sets and dicts. (#1232) - Normalize requested extra names before comparing or hashing requirements. (#644)
- Preserve a
Requirement's specifierprereleasesoverride across a pickle round trip. (#1204) - Raise
InvalidRequirementinstead ofInvalidSpecifierwhen a requirement contains an invalid specifier. (#1332) - Clarify the error for post-release prefix wildcards like
==1.0.post1.*. (#1299) - Preserve quoting semantics when serializing marker values, so round-tripped markers parse back to the same marker. (#1213)
- Keep the parentheses of a nested group when serializing markers. (#1316)
- Normalize
extraanddependency_groupsvalues in nested markers at parse time. (#1246, #1310) - Raise
UndefinedComparisonwhen a set-valued variable likeextrasis used outside the membership form. (#1265) - Raise
UndefinedEnvironmentName(aKeyErrorsubclass) for missing environment keys during marker evaluation. (#1276) - Wrap malformed string literal errors in
InvalidMarker/InvalidRequirementinstead of leaking a low-level error. (#1249) - Reject requirements and markers with a trailing line break. (#1345)
Fixes for metadata and licenses
- Collect all
from_emailvalidation errors into oneExceptionGroupinstead of raising the first. (#1268) - Accept the UTF-8 charset case-insensitively in email payloads. (#1330)
- Reject malformed
Description-Content-Typevalues. (#1329) - Don't rewrite user values that contain
{field}placeholders in error messages. (#1327) - Route multipart email payloads to
unparsedinstead of asserting. (#1247) - Make
InvalidMetadataandCyclicDependencyGrouppicklable. (#1328) - Fold every line boundary
str.splitlinesrecognizes when writing a header withRFC822Message. (#1356) - Raise
InvalidLicenseExpressionfor misplacedWITHclauses and emptyLicenseRef-names. (#1266) - Raise
InvalidLicenseExpressioninstead ofKeyErrorfor aLicenseRef-with a+suffix. (#1219)
Fixes for tags and filenames
- Raise
InvalidTagfromparse_tag()for tags with the wrong number of components. (#1238) - Reject empty tag components in
parse_wheel_filename()andparse_tag(). (#1234) - Reject an empty project name in the wheel and sdist filename parsers. (#1305)
- Reject wheel filenames with a trailing newline. (#1341)
- Reject wheel tags whose interpreter component is not an identifier. (#577)
is_normalized_namenow rejects names with collapsed double hyphens likea--b. (#1230)- Fix duplicate explicit
abi3ttags. (#1245) - Forward the
warnargument togeneric_tags()insys_tags(). (#1264) - Raise
SystemErrorfor an empty or malformed CPythonEXT_SUFFIX. (#1271, #1301) - Fix a typo in the macOS
fat3architecture name (wasfat32). (#1199)
Fixes for pylock, direct URLs, and dependency groups
- Percent-decode
pylockartifact file names derived from aurlso that local versions (e.g. a wheel with2.12.1+cu130encoded as2.12.1%2Bcu130) yield a valid file name. (#1314) - Use an explicitly empty
tagssequence inPylock.select()instead of falling back tosys_tags(). (#1349) - Fix
Pylock.select()on Python builds that report a non-PEP 440python_full_version(e.g.3.15.0+). (#1179) - Reject TOML booleans where integers are expected in
pylockfiles. (#1244) - Add
PylockSelectErrortopackaging.pylock.__all__. (#1202) - Fix
DirectUrlcredential stripping for passwords containing@. (#1218) - Parse the URL scheme case-insensitively when checking for file URLs in
direct_url. (#1240) - Require absolute file URLs for local directories in
direct_url. (#1297) - Collect
InvalidRequirementerrors while resolving dependency groups instead of leaking them. (#1302) - Don't cache malformed dependency group parses. (#1248)
Performance
- Implement
SpecifierandSpecifierSetfiltering with the new range engine. (#1120, #1259) - Cache the default marker environment. (#1250)
- Cache the
_manylinuxmodule lookup process-wide. (#1254) - Add
__slots__toRequirementand the token classes. (#1320, #1258) - Keep range caches across canonicalization, precompile the wheel project-name pattern, simplify
parse_tag(), and skipplatform.mac_ver()when the version and arch are given. (#1253, #1256, #1236, #1255)
Documentation
- Describe the validation scope of
packaging.pylock. (#1339) - Explain which
packaging.metadatafields are validated. (#1342) - Document
RFC822Policyin the low-levelpackaging.metadatainterface. (#1222) - Enable nitpicky mode and render missing classes and fields in the API reference. (#1196, #1225, #1277)
- Add missing
versionadded/versionchangeddirectives and many small docstring fixes across the API reference. (#1205, #1207, #1208, #1209, #1211, #1216, #1217, #1223, #1272, #1273, #1274, #1291, #1300, #1303, #1317, #1344)
Internal
- Add Python 3.15 to the test matrix. (#1190)
- Add a musl/Alpine test job and make the test suite pass on musl. (#1226, #1227)
- Expand the downstream test matrix by ten projects. (#1261)
- Update to mypy 2. (#1191)
- Use nox's uv integration. (#1057)
New Contributors
- @Sean-Kenneth-Doherty made their first contribution in https://github.com/pypa/packaging/pull/1187
- @jsirois made their first contribution in https://github.com/pypa/packaging/pull/1199
- @Alan-K-Biju-7 made their first contribution in https://github.com/pypa/packaging/pull/1217
- @facutuesca made their first contribution in https://github.com/pypa/packaging/pull/1218
- @NovaLux12 made their first contribution in https://github.com/pypa/packaging/pull/1317
- @atsuoishimoto made their first contribution in https://github.com/pypa/packaging/pull/1314
- @gaoflow made their first contribution in https://github.com/pypa/packaging/pull/1291
- @jacobdr made their first contribution in https://github.com/pypa/packaging/pull/608
- @deepakganesh78 made their first contribution in https://github.com/pypa/packaging/pull/1351
- @rajath201 made their first contribution in https://github.com/pypa/packaging/pull/1356
Full Changelog: https://github.com/pypa/packaging/compare/26.2...26.3
26.2
What's Changed
Fixes:
- Fix incorrect sysconfig var name for pyemscripten by @ryanking13 in https://github.com/pypa/packaging/pull/1160
- Make
Version,Specifier,SpecifierSet,Tag,Marker, andRequirementpickle-safe and backward-compatible with pickles created in 25.0-26.1 (including references to the removedpackaging._structuresmodule) by @eachimei and @henryiii in https://github.com/pypa/packaging/pull/1163, https://github.com/pypa/packaging/pull/1168, https://github.com/pypa/packaging/pull/1170, and https://github.com/pypa/packaging/pull/1171 - fix: re-export ExceptionGroup for now by @henryiii in https://github.com/pypa/packaging/pull/1164
Documentation:
- docs: add errors section and fix missing details by @henryiii in https://github.com/pypa/packaging/pull/1159
- docs(dev): document property-based test suite by @r266-tech in https://github.com/pypa/packaging/pull/1167
- Fix typo in DirectUrl documentation by @sbidoul in https://github.com/pypa/packaging/pull/1169
- docs(specifiers): add is_unsatisfiable() usage example by @r266-tech in https://github.com/pypa/packaging/pull/1166
Internal:
- Enable the auditor persona on zizmor by @henryiii in https://github.com/pypa/packaging/pull/1158
- Test new pickle guarantees by @henryiii in https://github.com/pypa/packaging/pull/1174
- Use native uv integration in rtd by @henryiii in https://github.com/pypa/packaging/pull/1175
New Contributors
- @ryanking13 made their first contribution in https://github.com/pypa/packaging/pull/1160
- @eachimei made their first contribution in https://github.com/pypa/packaging/pull/1163
Full Changelog: https://github.com/pypa/packaging/compare/26.1...26.2
26.1
Features:
PEP 783: add handling for Emscripten wheel tags by @hoodmane in https://github.com/pypa/packaging/pull/804(old name used in implementation, will be fixed in next release)- PEP 803: add handling for the
abi3.abi3tfree-threading tag by @ngoldbaum in https://github.com/pypa/packaging/pull/1099 - PEP 723: add
packaging.dependency_groupsmodule, based on thedependency-groupspackage by @sirosen in https://github.com/pypa/packaging/pull/1065 - Add the
packaging.direct_urlmodule by @sbidoul in https://github.com/pypa/packaging/pull/944 - Add the
packaging.errorsmodule by @henryiii in https://github.com/pypa/packaging/pull/1071 - Add
SpecifierSet.is_unsatisfiableusing ranges (new internals that will be expanded in future versions) by @notatallshaw in https://github.com/pypa/packaging/pull/1119 - Add
create_compatible_tags_selectorto select compatible tags by @sbidoul in https://github.com/pypa/packaging/pull/1110 - Add a
keyargument toSpecifierSet.filter()by @frostming in https://github.com/pypa/packaging/pull/1068 - Support
&and|forMarker's by @henryiii in https://github.com/pypa/packaging/pull/1146 - Normalize
Version.__replace__and addVersion.from_partsby @henryiii in https://github.com/pypa/packaging/pull/1078 - Add an option to validate compressed tag set sort order in
parse_wheel_filenameby @r266-tech in https://github.com/pypa/packaging/pull/1150
Behavior adaptations:
- Narrow exclusion of pre-releases for
<V.postNto match spec by @notatallshaw in https://github.com/pypa/packaging/pull/1140 - Narrow exclusion of post-releases for
>Vto match spec by @notatallshaw in https://github.com/pypa/packaging/pull/1141 - Rename
format_full_versionto_format_full_versionto make it visibly private by @r266-tech in https://github.com/pypa/packaging/pull/1125 - Restrict local version to ASCII by @henryiii in https://github.com/pypa/packaging/pull/1102
Pylock (PEP 751) updates:
- Add pylock
selectfunction by @sbidoul in https://github.com/pypa/packaging/pull/1092 - Document pylock
select()method andPylockSelectErrorby @r266-tech in https://github.com/pypa/packaging/pull/1153 - Add
filenameproperty toPackageSdistandPackageWheel, more validation by @sbidoul in https://github.com/pypa/packaging/pull/1095 - Give preference to path over url by @sbidoul in https://github.com/pypa/packaging/pull/1128
- Validate name/version consistency in file names by @sbidoul in https://github.com/pypa/packaging/pull/1114
Fixes:
- Fix
>comparison for versions with dev+local segments by @veeceey in https://github.com/pypa/packaging/pull/1097 - Fix incorrect self-comparison for
InfinityTypeandNegativeInfinityTypeby @bysiber in https://github.com/pypa/packaging/pull/1093 - Canonicalize when deduplicating specifiers in
SpecifierSetby @notatallshaw in https://github.com/pypa/packaging/pull/1109 - Fix charset error message formatting by @notatallshaw in https://github.com/pypa/packaging/pull/1121
- Handle the
keyparameter inSpecifierSet.filterwhen specifiers are empty and prerelease isFalseby @notatallshaw in https://github.com/pypa/packaging/pull/1096 - Standardize inner components of
reproutput by @henryiii in https://github.com/pypa/packaging/pull/1090 Specifier's===uses original string, not normalized, when available by @notatallshaw in https://github.com/pypa/packaging/pull/1124- Propagate int-max-str-digits
ValueErrorby @notatallshaw in https://github.com/pypa/packaging/pull/1155
Performance:
- Add fast path for parsing simple versions (digits and dots only) by @notatallshaw in https://github.com/pypa/packaging/pull/1082
- Add fast path for
VersiontoVersioncomparison by skipping_keyproperty by @notatallshaw in https://github.com/pypa/packaging/pull/1083 - Cache
Versionhash value in dedicated slot by @notatallshaw in https://github.com/pypa/packaging/pull/1118 - Overhaul
_cmpkeyto remove use of custom objects by @notatallshaw in https://github.com/pypa/packaging/pull/1116 - Skip
__replace__in Specifier comparison if not needed by @notatallshaw in https://github.com/pypa/packaging/pull/1081 SpecifierSetusetupleinstead offrozensetfor_specsby @notatallshaw in https://github.com/pypa/packaging/pull/1108- Speed up complex
SpecifierSetfiltering by implementing cost-based ordering by @notatallshaw in https://github.com/pypa/packaging/pull/1105 - Speed up wildcard comparison by @notatallshaw in https://github.com/pypa/packaging/pull/1111
- Stream PEP440 filtering in
SpecifierSet.filterby @notatallshaw in https://github.com/pypa/packaging/pull/1076 - Add
__slots__toMarkerby @henryiii in https://github.com/pypa/packaging/pull/1147 - Simply
Specifierregex by @sirosen in https://github.com/pypa/packaging/pull/1106 - Skip using the hash property internally by @notatallshaw in https://github.com/pypa/packaging/pull/1115
Internal:
- Add downstream testing by @henryiii in https://github.com/pypa/packaging/pull/1049
- Benchmarking suite by @henryiii in https://github.com/pypa/packaging/pull/1059
- Benchmark variance reduction by @notatallshaw in https://github.com/pypa/packaging/pull/1107
- Add property-based tests for PEP 440 by @notatallshaw in https://github.com/pypa/packaging/pull/1144
- Clean up a few
collections.namedtuplein tests by @henryiii in https://github.com/pypa/packaging/pull/1070 - Do not reload the tags module in tests by @henryiii in https://github.com/pypa/packaging/pull/1152
- Limit
dir()/ tab-completion in REPL by @henryiii in https://github.com/pypa/packaging/pull/1011 - Add more
__all__/__dir__by @henryiii in https://github.com/pypa/packaging/pull/1069 - Cleanup pre-commit a bit by @henryiii in https://github.com/pypa/packaging/pull/1080
- Pin pre-commit file, use dependabot by @henryiii in https://github.com/pypa/packaging/pull/1133
- Remove sphinx-toolbox by @henryiii in https://github.com/pypa/packaging/pull/1135
- Use docs group, faster readthedocs by @henryiii in https://github.com/pypa/packaging/pull/1061
- Add free-threaded Python to CI by @henryiii in https://github.com/pypa/packaging/pull/1098
- Simplify combining
SpecifierSet.prereleasesby @notatallshaw in https://github.com/pypa/packaging/pull/1073 - Use direct operator methods in
_compare_compatibleby @notatallshaw in https://github.com/pypa/packaging/pull/1100 - Remove unnecessary if statement in
Specifier.prereleasesby @notatallshaw in https://github.com/pypa/packaging/pull/1074 - Remove unneeded nesting in
Specifier.prereleasesby @notatallshaw in https://github.com/pypa/packaging/pull/1072
Documentation:
- Fix documentation: grammar, typos, formatting, and outdated references by @DimitriPapadopoulos in https://github.com/pypa/packaging/pull/1084
- Fix versionadded for
Version.from_parts()by @Jackenmen in https://github.com/pypa/packaging/pull/1134 - Document
&and|operators for combiningMarkerobjects by @r266-tech in https://github.com/pypa/packaging/pull/1151 - Expand and clean up
Versiondocumentation by @henryiii in https://github.com/pypa/packaging/pull/1089 - Move license docs inline by @henryiii in https://github.com/pypa/packaging/pull/1131
- Move markers inline by @henryiii in https://github.com/pypa/packaging/pull/1104
- Move tags docs to inline by @henryiii in https://github.com/pypa/packaging/pull/1130
- Move utilities inline, like other modules by @henryiii in https://github.com/pypa/packaging/pull/1103
Benchmarks
Performance improvements since 26.0, from the new integrated benchmark suite:
uv run asv run 26.0..HEAD
New Contributors
- @veeceey made their first contribution in https://github.com/pypa/packaging/pull/1097
- @bysiber made their first contribution in https://github.com/pypa/packaging/pull/1093
- @sirosen made their first contribution in https://github.com/pypa/packaging/pull/1106
- @Jackenmen made their first contribution in https://github.com/pypa/packaging/pull/1134
- @ngoldbaum made their first contribution in https://github.com/pypa/packaging/pull/1099
- @r266-tech made their first contribution in https://github.com/pypa/packaging/pull/1151
- @hoodmane made their first contribution in https://github.com/pypa/packaging/pull/804
Full Changelog: https://github.com/pypa/packaging/compare/26.0...26.1
26.0
Read about the performance improvements here: https://iscinumpy.dev/post/packaging-faster.
What's Changed
Features:
- PEP 751: support pylock by @sbidoul in https://github.com/pypa/packaging/pull/900
- PEP 794: import name metadata by @brettcannon in https://github.com/pypa/packaging/pull/948
- Support writing metadata by @henryiii in https://github.com/pypa/packaging/pull/846
- Support
__replace__forVersionby @henryiii in https://github.com/pypa/packaging/pull/1003 - Support positional pattern matching for
VersionandSpecifierby @henryiii in https://github.com/pypa/packaging/pull/1004
Behavior adaptations:
- PEP 440 handling of prereleases for
Specifier.contains,SpecifierSet.contains, andSpecifierSet.filterby @notatallshaw in https://github.com/pypa/packaging/pull/897 - Handle PEP 440 edge case in
SpecifierSet.filterby @notatallshaw in https://github.com/pypa/packaging/pull/942 - Adjust arbitrary equality intersection preservation in
SpecifierSetby @notatallshaw in https://github.com/pypa/packaging/pull/951 - Return
Falseinstead of raising for.containswith invalid version by @Liam-DeVoe in https://github.com/pypa/packaging/pull/932 - Support arbitrary equality on arbitrary strings for
SpecifierandSpecifierSet'sfilterandcontainsmethod. by @notatallshaw in https://github.com/pypa/packaging/pull/954 - Only try to parse as
Versionon certain marker keys, returnFalseon unequal ordered comparsions by @JP-Ellis in https://github.com/pypa/packaging/pull/939
Fixes:
- Update
_hashwhen unpicklingTag()by @dholth in https://github.com/pypa/packaging/pull/860 - Correct comment and simplify implicit prerelease handling in
Specifier.prereleasesby @notatallshaw in https://github.com/pypa/packaging/pull/896 - Use explicit
_GLibCVersionNamedTuplein_manylinuxby @cthoyt in https://github.com/pypa/packaging/pull/868 - Detect invalid license expressions containing
()by @bwoodsend in https://github.com/pypa/packaging/pull/879 - Correct regex for metadata
'name'format by @di in https://github.com/pypa/packaging/pull/925 - Improve the message around expecting a semicolon by @pradyunsg in https://github.com/pypa/packaging/pull/833
- Support nested parens in license expressions by @Liam-DeVoe in https://github.com/pypa/packaging/pull/931
- Add space before at symbol in
Requirementsstring by @henryiii in https://github.com/pypa/packaging/pull/953 - A root logger use found by ruff LOG, use
packaginglogger instead by @henryiii in https://github.com/pypa/packaging/pull/965 - Better support for subclassing
MarkerandRequirementby @henryiii in https://github.com/pypa/packaging/pull/1022 - Normalize all extras, not just if it comes first by @henryiii in https://github.com/pypa/packaging/pull/1024
- Don't produce a broken repr if
Markerfails to construct by @henryiii in https://github.com/pypa/packaging/pull/1033
Performance:
- Avoid recompiling regexes in the tokenizer for a 3x speedup by @hauntsaninja in https://github.com/pypa/packaging/pull/1019
- Improve performance in
_manylinux.pyby @cthoyt in https://github.com/pypa/packaging/pull/869 - Minor cleanups to
Versionby @bearomorphism in https://github.com/pypa/packaging/pull/913 - Skip redundant creation of
Versions in specifier comparison by @notatallshaw in https://github.com/pypa/packaging/pull/986 - Cache
Specifier's Version by @notatallshaw in https://github.com/pypa/packaging/pull/985 - Make
Versiona little faster by @henryiii in https://github.com/pypa/packaging/pull/987 - Minor
Versionregex cleanup by @henryiii in https://github.com/pypa/packaging/pull/990 - Faster regex on Python 3.11.5+ by @henryiii in https://github.com/pypa/packaging/pull/988 and https://github.com/pypa/packaging/pull/1055
- Lazily calculate
_keyinVersionby @notatallshaw in https://github.com/pypa/packaging/pull/989 and regression forpackaging_legacyfixed by @henryiii in https://github.com/pypa/packaging/pull/1048 - Faster
canonicalize_versionby @henryiii in https://github.com/pypa/packaging/pull/993 - Use
fullmatchin a couple more places by @henryiii in https://github.com/pypa/packaging/pull/992 - Use
fullmatchfor markers too by @henryiii in https://github.com/pypa/packaging/pull/1029 - Use
mapinstead of generator by @henryiii in https://github.com/pypa/packaging/pull/996 - Deprecate
._version(_Version, aNamedTuple) by @henryiii in https://github.com/pypa/packaging/pull/995 and https://github.com/pypa/packaging/pull/1062 - Avoid duplicate
Versioncreation incanonicalize_versionby @henryiii in https://github.com/pypa/packaging/pull/994 - Add
__slots__toVersionby @henryiii in https://github.com/pypa/packaging/pull/1001 - Add
__slots__toSpecifiers by @henryiii in https://github.com/pypa/packaging/pull/1002 - Add
__slots__toNodes by @henryiii in https://github.com/pypa/packaging/pull/1032 - Use
version.__replace__in specifier comparison by @notatallshaw in https://github.com/pypa/packaging/pull/999 - Use
_get_spec_versionin more places inSpecifierby @notatallshaw in https://github.com/pypa/packaging/pull/1005 - Pull
setconstruction out of function by @henryiii in https://github.com/pypa/packaging/pull/1012 - Letter normalization dict for prereleases and the like by @henryiii in https://github.com/pypa/packaging/pull/1014
- Avoid normalizing extras again when comparing by @henryiii in https://github.com/pypa/packaging/pull/1028
- Speed up
Version.__str__by about 10% by @henryiii in https://github.com/pypa/packaging/pull/997 - Increase the performance of
canonicalize_nameby avoiding a regex by @henryiii in https://github.com/pypa/packaging/pull/1030, https://github.com/pypa/packaging/pull/1047, and https://github.com/pypa/packaging/pull/1064 - Faster zero stripping by @henryiii in https://github.com/pypa/packaging/pull/1058
Type annotations:
- Fix a type annotation by @brettcannon in https://github.com/pypa/packaging/pull/907
- Fix tags return type in
parse_wheel_filenamedocs by @ncoghlan in https://github.com/pypa/packaging/pull/973 - Add type hint for
_versionin.version.Versionby @brettcannon in https://github.com/pypa/packaging/pull/927 - Changed static type annotations in prereleases setter method in
specifier.pyby @subhajitsaha01 in https://github.com/pypa/packaging/pull/930 - Statically type the tests by @henryiii in https://github.com/pypa/packaging/pull/982
Internal:
- Test and declare support Python 3.14 by @henryiii in https://github.com/pypa/packaging/pull/901
- Modernize and speed up tests on Python 3.14 by @henryiii in https://github.com/pypa/packaging/pull/903
- Change our license metadata to use an SPDX license expression by @cdce8p in https://github.com/pypa/packaging/pull/881
- No need for
license-filesby @DimitriPapadopoulos in https://github.com/pypa/packaging/pull/924 - Update mypy by @hauntsaninja in https://github.com/pypa/packaging/pull/891
- Some config updates by @henryiii in https://github.com/pypa/packaging/pull/902
- Add spell check and rst check by @henryiii in https://github.com/pypa/packaging/pull/904
- Clean up ruff ignores by @henryiii in https://github.com/pypa/packaging/pull/905
- Update example for env marker
python_versionby @trim21 in https://github.com/pypa/packaging/pull/908 - Move codespell configuration into pyproject.toml by @yarikoptic in https://github.com/pypa/packaging/pull/910
- Check warning a little more precisely by @henryiii in https://github.com/pypa/packaging/pull/837
- Speed up mypy a little by @henryiii in https://github.com/pypa/packaging/pull/836
- Apply ruff/flake8-pyi rules (PYI) by @DimitriPapadopoulos in https://github.com/pypa/packaging/pull/835
- Better local runs for codespell by @henryiii in https://github.com/pypa/packaging/pull/911
- Remove outdated/confusing Gist link by @stefan6419846 in https://github.com/pypa/packaging/pull/921
- Fix docs and docs ci after #897 landed by @notatallshaw in https://github.com/pypa/packaging/pull/926
- Run twine-check on push in CI by @EpicWink in https://github.com/pypa/packaging/pull/922
ruffwas renamedruff-checkin pre-commit by @henryiii in https://github.com/pypa/packaging/pull/933- Fix incorrectly implicitly concatenated string in specifiers test by @notatallshaw in https://github.com/pypa/packaging/pull/946
- Simplify conditional by @ofek in https://github.com/pypa/packaging/pull/949
- Modernize nox, use dependency-groups for tests by @henryiii in https://github.com/pypa/packaging/pull/952
- Add more checks that don't affect anything by @henryiii in https://github.com/pypa/packaging/pull/957
- Enable Ruff ISC rule by @henryiii in https://github.com/pypa/packaging/pull/959
- Ruff code FLY by @henryiii in https://github.com/pypa/packaging/pull/963
- pytest
log_levelis better thanlog_cli_levelby @henryiii in https://github.com/pypa/packaging/pull/956 - Ruff code TRY by @henryiii in https://github.com/pypa/packaging/pull/961
- Add the ruff PL checks by @henryiii in https://github.com/pypa/packaging/pull/964
- Enable Ruff ARG rules by @henryiii in https://github.com/pypa/packaging/pull/958
- Ruff PT code (pytest) by @henryiii in https://github.com/pypa/packaging/pull/960
- Add ruff DTZ by @henryiii in https://github.com/pypa/packaging/pull/968
- Add ruff BLE by @henryiii in https://github.com/pypa/packaging/pull/967
- Add the ruff SIM checks by @henryiii in https://github.com/pypa/packaging/pull/966
- Adding ruff PERF by @henryiii in https://github.com/pypa/packaging/pull/969
- Move some config into coverage config by @henryiii in https://github.com/pypa/packaging/pull/971
- Check ruff C4 by @henryiii in https://github.com/pypa/packaging/pull/962
- Adding ruff T20 by @henryiii in https://github.com/pypa/packaging/pull/972
- Add a tests pass job by @henryiii in https://github.com/pypa/packaging/pull/977
- Add ruff TC by @henryiii in https://github.com/pypa/packaging/pull/980
- Adding part of ruff RET by @henryiii in https://github.com/pypa/packaging/pull/979
- Reorder mypy check by @henryiii in https://github.com/pypa/packaging/pull/983
- Enable ruff ALL by @henryiii in https://github.com/pypa/packaging/pull/984
- Link back to repo/source in furo by @henryiii in https://github.com/pypa/packaging/pull/991
- Add case insensitivity tests for arbitrary equality by @notatallshaw in https://github.com/pypa/packaging/pull/975
- Synchronize documentation and code for markers by @zahlman in https://github.com/pypa/packaging/pull/1008
- Use
partitionin_parse_project_urlsby @henryiii in https://github.com/pypa/packaging/pull/1013 - auto-skip the dependabot PRs in the release changelog generation by @henryiii in https://github.com/pypa/packaging/pull/1016
- Update unreleased section in changelog by @henryiii in https://github.com/pypa/packaging/pull/1017
- Fix PR role to match extlinks by @hugovk in https://github.com/pypa/packaging/pull/1020
- Mention new parts in README by @henryiii in https://github.com/pypa/packaging/pull/1023
- Replace a couple of asserts with else by @henryiii in https://github.com/pypa/packaging/pull/1027
- Simplify and/or check a little more by @henryiii in https://github.com/pypa/packaging/pull/1031
- Use slim runner for all check by @henryiii in https://github.com/pypa/packaging/pull/1021
- Use typos instead of codespell by @henryiii in https://github.com/pypa/packaging/pull/1015
- Update changelog with recent additions by @henryiii in https://github.com/pypa/packaging/pull/1034
- Publish to PyPI via GitHub CI by @EpicWink in https://github.com/pypa/packaging/pull/893
- Use prek for faster pre-commit lint step by @henryiii in https://github.com/pypa/packaging/pull/1037
- Add help text to noxfile by @henryiii in https://github.com/pypa/packaging/pull/1038
- Update licenses to 3.27 by @henryiii in https://github.com/pypa/packaging/pull/1036
- Use relative import in
packaging.licensesby @notatallshaw in https://github.com/pypa/packaging/pull/1039 - Add zizmor and tighten up CI by @henryiii in https://github.com/pypa/packaging/pull/1035
- Fix release script by @henryiii in https://github.com/pypa/packaging/pull/1040
- Fix using a dev version (again) by @henryiii in https://github.com/pypa/packaging/pull/1041
- Fix type hint of function used with
contextlib.contextmanagerby @SpecLad in https://github.com/pypa/packaging/pull/1046 - Always run tests by @henryiii in https://github.com/pypa/packaging/pull/1044
- Fix a changelog number by @henryiii in https://github.com/pypa/packaging/pull/1042
- Fix the publish job by @henryiii in https://github.com/pypa/packaging/pull/1043
- Get the correct tag on publish by @henryiii in https://github.com/pypa/packaging/pull/1045
- Test on first public release of CPython 3.11 and newer by @henryiii in https://github.com/pypa/packaging/pull/1056
- Fix publication job (again) by @henryiii in https://github.com/pypa/packaging/pull/1051
- Use
actionlintto check CI workflows by @miketheman in https://github.com/pypa/packaging/pull/1052 - Fix formatting of distribution types in metadata.rst by @brettcannon in https://github.com/pypa/packaging/pull/1053
New Contributors
- @cdce8p made their first contribution in https://github.com/pypa/packaging/pull/881
- @dholth made their first contribution in https://github.com/pypa/packaging/pull/860
- @trim21 made their first contribution in https://github.com/pypa/packaging/pull/908
- @yarikoptic made their first contribution in https://github.com/pypa/packaging/pull/910
- @cthoyt made their first contribution in https://github.com/pypa/packaging/pull/868
- @bwoodsend made their first contribution in https://github.com/pypa/packaging/pull/879
- @stefan6419846 made their first contribution in https://github.com/pypa/packaging/pull/921
- @bearomorphism made their first contribution in https://github.com/pypa/packaging/pull/913
- @EpicWink made their first contribution in https://github.com/pypa/packaging/pull/922
- @Liam-DeVoe made their first contribution in https://github.com/pypa/packaging/pull/932
- @subhajitsaha01 made their first contribution in https://github.com/pypa/packaging/pull/930
- @ncoghlan made their first contribution in https://github.com/pypa/packaging/pull/973
- @zahlman made their first contribution in https://github.com/pypa/packaging/pull/1008
- @JP-Ellis made their first contribution in https://github.com/pypa/packaging/pull/939
Since last RC
Fixes:
- Restore
._versionas a compat shim by @henryiii in https://github.com/pypa/packaging/pull/1062
Performance:
- Dual replace by @henryiii in https://github.com/pypa/packaging/pull/1064
Documentaiton:
- Prepare for 26.0 final by @henryiii in https://github.com/pypa/packaging/pull/1063
Full Changelog: https://github.com/pypa/packaging/compare/26.0rc3...26.0