packaging breaking changes
Updated December 4, 2026
On this page
Latest version 26.4, released November 23, 2026. Source repository
Its 26.4 release drops Python 3.9. Python end of life dates.
- From 25.0 to 26.4: 74 breaking changes in 6 versions.
- From 22.0 to 26.4: 112 breaking changes in 10 versions.
packaging 26.4 breaking changes
- Removed
Python 3.9 is no longer supported by this release, so code running on Python 3.9 must move to a newer Python version. github.com - Behavior changed
compatible_tags
An explicitly empty platforms iterable now yields no platforms instead of using the host platforms. github.com - Behavior changed
cpython_tags
An explicitly empty platforms iterable now yields no platforms instead of using the host platforms. github.com - Behavior changed
generic_tags
An explicitly empty platforms iterable now yields no platforms instead of using the host platforms. github.com - Behavior changed
InvalidMarker
Markers nested more than 200 levels deep now raise InvalidMarker. github.com - Behavior changed
License-File
Windows drive-relative License-File paths such as C:LICENSE are now rejected. github.com - Behavior changed
Marker.evaluate
Marker.evaluate() now raises UndefinedComparison when extras or dependency_groups is a string instead of a set. github.com - Behavior changed
Pylock.select
Pylock.select() now raises PylockSelectError for an explicitly empty environments list and for unknown extras and dependency groups. github.com - Behavior changed
Requirement
Requirement URLs containing any whitespace, including Unicode whitespace, are now rejected. github.com - Behavior changed
Specifier
An empty arbitrary-equality version (===) in specifiers and requirements is now rejected, so such inputs that used to parse will fail. github.com - Behavior changed
SpecifierSet
Elements of the iterable form of SpecifierSet that are not Specifier or str now raise TypeError. github.com - Behavior changed
str
str() of markers joined with & or | now omits parentheses when unambiguous, so code that compares or parses marker strings may see different text. github.com - Behavior changed
Version.__replace__
Unknown keyword arguments passed to Version.__replace__() now raise TypeError instead of being ignored, so calls passing extra arguments will fail. github.com - Signature changed
packaging.requirements.Requirement.__getstate__
Was def __getstate__(self) -> tuple[str, bool | None]; now def __getstate__(self) -> tuple[str, bool | None, tuple[bool | None, ...]]. pypi.org - Signature changed
packaging.specifiers.SpecifierSet.__init__
Was def __init__(self, specifiers: str | Iterable[Specifier] = '', prereleases: bool | None = None) -> None; now def __init__(self, specifiers: str | Iterable[Specifier | str] = '', prereleases: bool | None = None) -> None. pypi.org - Signature changed
packaging.version.Version.__replace__
Was def __replace__(self, **kwargs: Unpack[_VersionReplace]) -> Self; now def __replace__(self, *, epoch: int | None = _UNSET, release: tuple[int, ...] | None = _UNSET, pre: tuple[str, int] | None = _UNSET, post: int | None = _UNSET, dev... pypi.org
packaging 26.3 breaking changes
- Removed
packaging now requires Python 3.9 or later, so Python 3.8 users must upgrade their interpreter before installing this release. github.com - Behavior changed
Local directory URLs in direct_url must now be absolute file URLs; relative forms that were accepted before are rejected. github.com - Behavior changed
On Linux, native linux_* platform tags are now preferred over manylinux and musllinux tags, which changes which wheels are selected. github.com - Behavior changed
InvalidSpecifier
A requirement containing an invalid specifier now raises InvalidRequirement instead of InvalidSpecifier, so handlers must catch InvalidRequirement. github.com - Behavior changed
is_normalized_name
Names with collapsed double hyphens such as a--b are no longer treated as normalized, so callers relying on the old result will see different outcomes. github.com - Behavior changed
Pylock.select
An explicitly empty tags sequence passed to Pylock.select now selects nothing instead of falling back to the running platform's tags. github.com - Behavior changed
Version
Passing a non-string to Version now raises InvalidVersion instead of TypeError, so code catching TypeError must catch InvalidVersion. github.com - Signature changed
packaging.markers.UndefinedEnvironmentName
Was class UndefinedEnvironmentName(ValueError); now class UndefinedEnvironmentName(KeyError). pypi.org - Signature changed
packaging.metadata.Metadata.version
Was version: _Validator[version_module.Version]; now version: _Validator[Version]. pypi.org - Signature changed
packaging.pylock.Pylock.select
Was def select(self, *, environment: Environment | None = None, tags: Sequence[Tag] | None = None, extras: Collection[str] | None = None, dependency_groups: Collection[str] | None = None) -> Iterator[tuple[Package, PackageVcs |... pypi.org
And 2 more in this version. Sign up to see every change
packaging 26.2 breaking changes
- Signature changed
packaging.tags.Tag.__setstate__
Was def __setstate__(self, state: tuple[None, dict[str, Any]]) -> None; now def __setstate__(self, state: object) -> None. pypi.org
packaging 26.1 breaking changes
- Removed
packaging.metadata.licenses
packaging.metadata.licenses was removed in packaging 26.1 pypi.org - Removed
packaging.metadata.NormalizedLicenseExpression
packaging.metadata.NormalizedLicenseExpression was removed in packaging 26.1 pypi.org - Removed
packaging.metadata.requirements
packaging.metadata.requirements was removed in packaging 26.1 pypi.org - Removed
packaging.metadata.specifiers
packaging.metadata.specifiers was removed in packaging 26.1 pypi.org - Removed
packaging.metadata.T
packaging.metadata.T was removed in packaging 26.1 pypi.org - Removed
packaging.metadata.utils
packaging.metadata.utils was removed in packaging 26.1 pypi.org - Removed
packaging.metadata.version_module
packaging.metadata.version_module was removed in packaging 26.1 pypi.org - Removed
packaging.requirements.canonicalize_name
packaging.requirements.canonicalize_name was removed in packaging 26.1 pypi.org - Removed
packaging.requirements.Marker
packaging.requirements.Marker was removed in packaging 26.1 pypi.org - Removed
packaging.requirements.ParserSyntaxError
packaging.requirements.ParserSyntaxError was removed in packaging 26.1 pypi.org
And 20 more in this version. Sign up to see every change
packaging 26.0 breaking changes
- Behavior changed
Marker
Only certain marker keys are parsed as Version, and unequal ordered comparisons now return False, which can change marker evaluation results. github.com - Behavior changed
Specifier.contains
Prerelease matching in Specifier.contains, SpecifierSet.contains and SpecifierSet.filter now follows PEP 440, so results may differ from earlier versions for prerelease versions. github.com - Behavior changed
SpecifierSet
The preservation of arbitrary equality specifiers when intersecting in SpecifierSet was changed, so combined specifier sets may differ from earlier versions. github.com - Behavior changed
SpecifierSet.contains
Prerelease matching in Specifier.contains, SpecifierSet.contains and SpecifierSet.filter now follows PEP 440, so results may differ from earlier versions for prerelease versions. github.com - Behavior changed
SpecifierSet.filter
Prerelease matching in Specifier.contains, SpecifierSet.contains and SpecifierSet.filter now follows PEP 440, so results may differ from earlier versions for prerelease versions. github.com - Signature changed
packaging.markers.Marker.__eq__
Was def __eq__(self, other: Any) -> bool; now def __eq__(self, other: object) -> bool. pypi.org - Signature changed
packaging.markers.Marker.evaluate
Was def evaluate(self, environment: dict[str, str] | None = None, context: EvaluateContext = 'metadata') -> bool; now def evaluate(self, environment: Mapping[str, str | AbstractSet[str]] | None = None, context: EvaluateContext =... pypi.org - Signature changed
packaging.requirements.Requirement.__eq__
Was def __eq__(self, other: Any) -> bool; now def __eq__(self, other: object) -> bool. pypi.org - Signature changed
packaging.specifiers.Specifier.prereleases
Was prereleases: bool; now prereleases: bool | None. pypi.org
packaging 26.0rc1 breaking changes
- Removed
_version
The private _version (_Version NamedTuple) attribute was dropped; code that reads it must stop doing so. github.com - Behavior changed
Log messages are now emitted on the packaging logger instead of the root logger, so logging configuration may need updating. github.com - Behavior changed
Specifier.contains
Prerelease matching in Specifier.contains now follows PEP 440 rules, so results can differ from earlier versions. github.com - Behavior changed
SpecifierSet
Intersections involving arbitrary equality (===) are preserved differently, so combined specifier results may change. github.com - Behavior changed
SpecifierSet.contains
Prerelease matching in SpecifierSet.contains now follows PEP 440 rules, so results can differ from earlier versions. github.com - Behavior changed
SpecifierSet.filter
Prerelease filtering in SpecifierSet.filter now follows PEP 440 rules, so results can differ from earlier versions. github.com
Older versions
5 older versions, each with its first changes. Sign up to see every change
Show 5 older versions
packaging 25.0 breaking changes
- Signature changed
packaging.markers.Marker.evaluate
Was def evaluate(self, environment: dict[str, str] | None = None) -> bool; now def evaluate(self, environment: dict[str, str] | None = None, context: EvaluateContext = 'metadata') -> bool. pypi.org
packaging 24.2 breaking changes
- Removed
The release drops Python 3.7 support, as noted in a changelog entry. Users on Python 3.7 must stay on an earlier release or upgrade their Python. github.com - Removed
packaging.tags.MacVersion
packaging.tags.MacVersion was removed in packaging 24.2 pypi.org
And 3 more in this version.
packaging 24.0 breaking changes
- Removed
packaging.metadata.ExceptionGroup.__init__
ExceptionGroup() was removed in packaging 24.0 pypi.org - Removed
packaging.metadata.ExceptionGroup.__repr__
ExceptionGroup.__repr__ was removed in packaging 24.0 pypi.org
And 29 more in this version.
packaging 23.0 breaking changes
- Signature changed
packaging.specifiers.BaseSpecifier.filter
Was def filter(self, iterable: Iterable[UnparsedVersion], prereleases: Optional[bool] = None) -> Iterator[UnparsedVersion]; now def filter(self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None) ->... pypi.org
packaging 22.0 breaking changes
- Removed
Python 3.6 is no longer supported; upgrade the interpreter before using this release. github.com - Removed
packaging.metadata
The packaging.metadata module was removed again before this release. github.com
And 51 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.