pypi / poetry
poetry
What changed in poetry 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.
1 breaking5 security1 new APIs and options8 performance1 behavior and defaults1 tooling31 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpoetry 248 changes
Breaking changes 1
When virtualenv creation is disabled, Poetry now errors if the current Python version is incompatible with the project.
Security 5
Credentials from a repository on another host are no longer used for git dependencies merely because the URL paths match.
Credentials configured for an https repository are no longer sent via http.
Fixes cases where credentials from the wrong repository were used when multiple repositories shared a host.
Poetry has Path Traversal in tar extraction on Python 3.10.0 - 3.10.12 and 3.11.0 - 3.11.4
Poetry Has Wheel Path Traversal Which Can Lead to Arbitrary File Write
New APIs and options 1
Adds a setting to uninstall packages with a built-in uninstaller instead of invoking pip uninstall.
Performance 8
Dependency resolution is faster.
Schema validation is faster by caching compiled JSON schema validators.
Avoids redundant keyring lookups for repositories without credentials.
Processing package links and repository pages is faster.
Search is faster for single-token queries.
Startup is faster because the requests import is deferred.
Reduces the number of subprocesses used to discover virtual environment data.
Choosing and installing wheels is faster.
Behavior and default changes 1
Messages about already present packages now include the path of the pyproject.toml file.
Tooling 1
Python 3.15 is added to the automatically generated classifiers.
Fixes and other changes 31
Fixes a TypeError that occurred when uninstalling a package with this setting enabled.
The upper bound is corrected for ~= constraints on versions with more than three release segments.
Fixes resolution failures for conflicting requirements with mutually exclusive markers.
Fixes resolution failures when the same package is required with different extras in multiple optional dependencies or groups.
Fixes a dependency resolution failure that raised a KeyError.
Path and git dependencies are reinstalled when their develop setting changes.
Path dependencies no longer write a relative path to direct_url.json.
Scripts of type file are now installed when installing the project.
GUI scripts are now installed when installing the project.
Links created from Windows paths now have the correct filename, and filenames containing path separators are rejected.
Dependencies of an extra are no longer omitted from the lock file when the extra is added to a locked dependency in pyproject.toml.
Marker values containing spaces can now be parsed.
Merging platform_release markers with incompatible constraint types no longer fails.
Uses the environment determined by the application, including when using --directory.
Version constraints entered interactively are now validated.
No longer proposes an invalid package name when the directory name is not a valid package name.
poetry show <package> now displays a version relevant to the current environment when multiple versions are in the lock file.
The --outdated option now finds newer package versions from sources with explicit priority.
Adds official support for Python 3.15.
Formatting a Python constraint that only allows unknown Python versions no longer raises an IndexError.
Fixes cases where a <V constraint wrongly allowed pre-releases of V.
A != <value> constraint is no longer incorrectly considered to allow all values of a <value> not in constraint.
Subtracting a local version from a public version no longer allows that local version, avoiding a possible infinite loop during dependency resolution.
Ranges with coincident bounds are now recognized as empty.
Intersections between a version range and a local version now produce the correct constraint.
Ranges excluding some local versions of a public version are no longer incorrectly considered to allow all versions of that public version.
Stringifying a version range whose upper bound consists only of zeros no longer raises an IndexError.
The string representation of a version union now describes the same constraint when parsed again.
A union of a version range and a public version now includes all local versions of that public version.
The union of a public version and one of its local versions now results in the public version.
Fixed an issue preventing Poetry from extracting sdists on Python 3.10.0–3.10.12 and 3.11.0–3.11.4.