@@ -9,32 +9,166 @@ Features:
99* Add a public :class: `~packaging.ranges.VersionRange ` API and
1010 :meth: `SpecifierSet.to_range() <packaging.specifiers.SpecifierSet.to_range> `,
1111 representing the versions a specifier set accepts as an interval set that
12- supports intersection, union, complement, membership tests, and filtering.
12+ supports intersection, union, difference, complement, set relations,
13+ membership tests, and filtering.
1314 :meth: `~packaging.ranges.VersionRange.to_specifier_set ` converts a range back
1415 to a :class: `~packaging.specifiers.SpecifierSet ` where a PEP 440 form exists.
15- (:pull: `1267 `, :pull: `1270 `)
16+ (:pull: `1267 `, :pull: `1270 `, :pull: `1298 `)
17+ * PEP 808: accept ``Metadata-Version: 2.6 ``. (:pull: `1194 `)
1618* Add a ``limit `` argument to ``parse_tag() `` for compressed tag sets.
1719 (:issue: `1220 `)
20+ * Add a ``prefer_sdist_predicate `` argument to ``Pylock.select() `` to prefer
21+ source distributions over wheels for selected packages. (:pull: `1334 `)
22+ * Add :func: `~packaging.tags.pure_python_tags ` to generate the pure-Python
23+ tags for a Python version without touching the running platform.
24+ (:pull: `1346 `)
25+ * Add :meth: `SpecifierSet.is_subset()
26+ <packaging.specifiers.SpecifierSet.is_subset> `, :meth: `~packaging.specifiers.SpecifierSet.is_superset `,
27+ and :meth: `~packaging.specifiers.SpecifierSet.is_disjoint `, which compare the
28+ versions two specifier sets accept. (:pull: `1313 `)
1829
1930Behavior adaptations:
2031
32+ * Drop support for Python 3.8; packaging now requires Python 3.9 or later.
33+ (:pull: `1157 `)
2134* Prefer native ``linux_* `` platform tags over ``manylinux `` and ``musllinux ``
2235 tags on Linux. (:issue: `160 `)
2336
24- Fixes:
37+ Fixes for versions and specifiers:
38+
39+ * Raise ``InvalidVersion `` instead of ``TypeError `` when ``Version `` is given a
40+ non-string. (:pull: `1319 `)
41+ * Raise ``InvalidVersion `` for non-string pre-release letters passed to
42+ ``Version.from_parts ``. (:pull: `1241 `)
43+ * Fix an ``AttributeError `` when hashing internally trimmed versions.
44+ (:pull: `1242 `)
45+ * Fix ``SpecifierSet.is_unsatisfiable `` for post-release boundary
46+ intersections. (:pull: `1257 `)
47+
48+ Fixes for requirements and markers:
2549
2650* Make ``Requirement.__hash__ `` consistent with ``__eq__ `` for
2751 trailing-zero-equivalent specifiers (e.g. ``foo==1.0.0 `` and
2852 ``foo==1.0.0.0 ``), so equal requirements hash equal and deduplicate in
2953 sets and dicts. (:pull: `1232 `)
30- * Percent-decode ``pylock `` artifact file names derived from a ``url `` so that
31- local versions (e.g. a wheel with ``2.12.1+cu130 `` encoded as ``2.12.1%2Bcu130 ``)
32- yield a valid file name.
33- * Normalize requested extra names before comparing or hashing requirements (:issue: `644 `)
54+ * Normalize requested extra names before comparing or hashing requirements.
55+ (:issue: `644 `)
3456* Preserve a ``Requirement ``'s specifier ``prereleases `` override across a
3557 pickle round trip. (:issue: `1204 `)
36- * Reject wheel tags containing interpreter components that are not identifiers.
58+ * Raise ``InvalidRequirement `` instead of ``InvalidSpecifier `` when a
59+ requirement contains an invalid specifier. (:pull: `1332 `)
60+ * Clarify the error for post-release prefix wildcards like ``==1.0.post1.* ``.
61+ (:pull: `1299 `)
62+ * Preserve quoting semantics when serializing marker values, so round-tripped
63+ markers parse back to the same marker. (:pull: `1213 `)
64+ * Keep the parentheses of a nested group when serializing markers.
65+ (:pull: `1316 `)
66+ * Normalize ``extra `` and ``dependency_groups `` values in nested markers at
67+ parse time. (:pull: `1246 `, :pull: `1310 `)
68+ * Raise ``UndefinedComparison `` when a set-valued variable like ``extras `` is
69+ used outside the membership form. (:pull: `1265 `)
70+ * Raise ``UndefinedEnvironmentName `` (a ``KeyError `` subclass) for missing
71+ environment keys during marker evaluation. (:pull: `1276 `)
72+ * Wrap malformed string literal errors in ``InvalidMarker `` /
73+ ``InvalidRequirement `` instead of leaking a low-level error. (:pull: `1249 `)
74+ * Reject requirements and markers with a trailing line break. (:pull: `1345 `)
75+
76+ Fixes for metadata and licenses:
77+
78+ * Collect all ``from_email `` validation errors into one ``ExceptionGroup ``
79+ instead of raising the first. (:pull: `1268 `)
80+ * Accept the UTF-8 charset case-insensitively in email payloads.
81+ (:pull: `1330 `)
82+ * Reject malformed ``Description-Content-Type `` values. (:pull: `1329 `)
83+ * Don't rewrite user values that contain ``{field} `` placeholders in error
84+ messages. (:pull: `1327 `)
85+ * Route multipart email payloads to ``unparsed `` instead of asserting.
86+ (:pull: `1247 `)
87+ * Make ``InvalidMetadata `` and ``CyclicDependencyGroup `` picklable.
88+ (:pull: `1328 `)
89+ * Raise ``InvalidLicenseExpression `` for misplaced ``WITH `` clauses and empty
90+ ``LicenseRef- `` names. (:pull: `1266 `)
91+ * Raise ``InvalidLicenseExpression `` instead of ``KeyError `` for a
92+ ``LicenseRef- `` with a ``+ `` suffix. (:pull: `1219 `)
93+
94+ Fixes for tags and filenames:
95+
96+ * Raise ``InvalidTag `` from ``parse_tag() `` for tags with the wrong number of
97+ components. (:pull: `1238 `)
98+ * Reject empty tag components in ``parse_wheel_filename() `` and
99+ ``parse_tag() ``. (:pull: `1234 `)
100+ * Reject an empty project name in the wheel and sdist filename parsers.
101+ (:pull: `1305 `)
102+ * Reject wheel filenames with a trailing newline. (:pull: `1341 `)
103+ * Reject wheel tags whose interpreter component is not an identifier.
37104 (:issue: `577 `)
105+ * ``is_normalized_name `` now rejects names with collapsed double hyphens like
106+ ``a--b ``. (:pull: `1230 `)
107+ * Fix duplicate explicit ``abi3t `` tags. (:pull: `1245 `)
108+ * Forward the ``warn `` argument to ``generic_tags() `` in ``sys_tags() ``.
109+ (:pull: `1264 `)
110+ * Raise ``SystemError `` for an empty or malformed CPython ``EXT_SUFFIX ``.
111+ (:pull: `1271 `, :pull: `1301 `)
112+ * Fix a typo in the macOS ``fat3 `` architecture name (was ``fat32 ``).
113+ (:pull: `1199 `)
114+
115+ Fixes for pylock, direct URLs, and dependency groups:
116+
117+ * Percent-decode ``pylock `` artifact file names derived from a ``url `` so that
118+ local versions (e.g. a wheel with ``2.12.1+cu130 `` encoded as ``2.12.1%2Bcu130 ``)
119+ yield a valid file name. (:pull: `1314 `)
120+ * Use an explicitly empty ``tags `` sequence in ``Pylock.select() `` instead of
121+ falling back to ``sys_tags() ``. (:pull: `1349 `)
122+ * Fix ``Pylock.select() `` on Python builds that report a non-PEP 440
123+ ``python_full_version `` (e.g. ``3.15.0+ ``). (:pull: `1179 `)
124+ * Reject TOML booleans where integers are expected in ``pylock `` files.
125+ (:pull: `1244 `)
126+ * Add ``PylockSelectError `` to ``packaging.pylock.__all__ ``. (:pull: `1202 `)
127+ * Fix ``DirectUrl `` credential stripping for passwords containing ``@ ``.
128+ (:pull: `1218 `)
129+ * Parse the URL scheme case-insensitively when checking for file URLs in
130+ ``direct_url ``. (:pull: `1240 `)
131+ * Require absolute file URLs for local directories in ``direct_url ``.
132+ (:pull: `1297 `)
133+ * Collect ``InvalidRequirement `` errors while resolving dependency groups
134+ instead of leaking them. (:pull: `1302 `)
135+ * Don't cache malformed dependency group parses. (:pull: `1248 `)
136+
137+ Performance:
138+
139+ * Implement ``Specifier `` and ``SpecifierSet `` filtering with the new range
140+ engine. (:pull: `1120 `, :pull: `1259 `)
141+ * Cache the default marker environment. (:pull: `1250 `)
142+ * Cache the ``_manylinux `` module lookup process-wide. (:pull: `1254 `)
143+ * Add ``__slots__ `` to ``Requirement `` and the token classes. (:pull: `1320 `,
144+ :pull: `1258 `)
145+ * Keep range caches across canonicalization, precompile the wheel project-name
146+ pattern, simplify ``parse_tag() ``, and skip ``platform.mac_ver() `` when the
147+ version and arch are given. (:pull: `1253 `, :pull: `1256 `, :pull: `1236 `,
148+ :pull: `1255 `)
149+
150+ Documentation:
151+
152+ * Describe the validation scope of ``packaging.pylock ``. (:pull: `1339 `)
153+ * Explain which ``packaging.metadata `` fields are validated. (:pull: `1342 `)
154+ * Document ``RFC822Policy `` in the low-level ``packaging.metadata `` interface.
155+ (:pull: `1222 `)
156+ * Enable nitpicky mode and render missing classes and fields in the API
157+ reference. (:pull: `1196 `, :pull: `1225 `, :pull: `1277 `)
158+ * Add missing ``versionadded `` / ``versionchanged `` directives and many small
159+ docstring fixes across the API reference. (:pull: `1205 `, :pull: `1207 `,
160+ :pull: `1208 `, :pull: `1209 `, :pull: `1211 `, :pull: `1216 `, :pull: `1217 `,
161+ :pull: `1223 `, :pull: `1272 `, :pull: `1273 `, :pull: `1274 `, :pull: `1291 `,
162+ :pull: `1300 `, :pull: `1303 `, :pull: `1317 `, :pull: `1344 `)
163+
164+ Internal:
165+
166+ * Add Python 3.15 to the test matrix. (:pull: `1190 `)
167+ * Add a musl/Alpine test job and make the test suite pass on musl.
168+ (:pull: `1226 `, :pull: `1227 `)
169+ * Expand the downstream test matrix by ten projects. (:pull: `1261 `)
170+ * Update to mypy 2. (:pull: `1191 `)
171+ * Use nox's uv integration. (:pull: `1057 `)
38172
3917326.2 - 2026-04-24
40174~~~~~~~~~~~~~~~~~
0 commit comments