pypi / poetry
poetry
What changed in poetry 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-21.
36 breaking6 security5 deprecations42 new APIs and options8 performance24 behavior and defaults2 tooling124 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpoetry 2196 changes
Breaking changes 25
When virtualenv creation is disabled, Poetry now errors if the current Python version is incompatible with the project.
Raises an error when a package name passed to the command is not a dependency, rather than silently ignoring it.
A version with the local version identifier 0 is no longer treated as equal to the corresponding public version.
Poetry raises an error if it cannot determine a hash for any distribution link of a package.
Poetry now requires dulwich.
The command validates the content of project.readme.
The command now fails when the requested Python version is unsupported by the project instead of using another version.
Python 3.9 is no longer supported.
Unsatisfiable requirements now raise an error.
Renames experimental.system-git-client.
Installed packages are ignored during dependency resolution.
The pip-based installation option, installer.modern-installation = false, was removed.
Reading lock files created with Poetry prior to 1.1 is no longer supported.
Dependency management in isolated build environments now uses Poetry instead of pip.
Now requires specifying an extra to which the optional dependency is added.
Adds a command as a replacement for poetry shell.
Is no longer included by default because the poetry-plugin-export dependency was removed.
Defaults to --no-update; --regenerate provides the old default behavior.
Was outsourced to poetry-plugin-shell.
A warning that the current project cannot be installed is now an error.
Support for Python 3.8 was dropped.
Support for scripts with extras was removed.
The option was removed, and setuptools is no longer included by default.
Replaces virtualenvs.prefer-active-python with the inverse setting; the active Python is preferred by default.
Support for x in version constraints was removed.
Security 6
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.
Fixes a path traversal vulnerability when downloading files from a compromised URL or package source.
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
Deprecations 4
This module is deprecated in favor of importlib.metadata.
Deprecated in favor of poetry sync.
Several fields are deprecated in favor of their respective fields in the project section of pyproject.toml.
Deprecated in favor of tool.poetry.group.dev.dependencies.
New APIs and options 26
Adds a setting to uninstall packages with a built-in uninstaller instead of invoking pip uninstall.
Requires package releases to be a specified number of days old before they are considered during dependency resolution.
Excludes selected packages from release-age filtering.
Excludes all packages from selected package indexes from release-age filtering.
Dependencies can now specify build constraints.
Publishing supports artifacts whose version is determined dynamically by the build-backend.
Editable project plugins are supported.
The cache name is optional, allowing the command to clear all caches.
The --skip-existing option is supported for new Nexus OSS versions.
Adds FIPS support for publishing.
Supports string comparisons using in and not in.
Adds a configuration option to enforce the use of binary distribution formats.
Adds an option, defaulting to true, that allows installation without re-resolving locked markers and groups.
Adds an option to add a dependency with markers.
Adds the --clean option.
Adds the --local-version option.
Adds an option to migrate outdated configurations.
Adds an option to install all groups.
Can be used interactively to configure more project fields.
Searches for pyproject.toml in another directory without switching directories.
Adds a command as a replacement for poetry install --sync.
Supports the PEP 621 project section in pyproject.toml.
Projects can define required Poetry plugins, which are automatically installed if not present.
Projects can define a constraint for the Poetry version required to manage them.
Supports script files generated by a build script.
Package builds now support SOURCE_DATE_EPOCH.
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 16
Messages about already present packages now include the path of the pyproject.toml file.
The default changes from true to false.
Poetry prefers the JSON API to the HTML API.
Poetry automatically updates the cache when a package's locked files differ from cached files.
PEP 735 dependency groups are included in the lock file hash.
The output now shows the path to Poetry's own Python.
When poetry new is run for an existing directory, Poetry proposes poetry init.
Poetry checks requires-poetry before performing any other validation.
New projects limit build-system to the current major version of poetry-core.
Adds partial support for conflicting extras.
Downloads can resume after connection resets.
Supports shortened hashes when defining git dependencies.
Generated METADATA files use version 2.3 instead of 2.2.
Supports non-PEP 440-compliant versions.
Supports searching in legacy sources.
New projects use >= instead of ^ for the Python requirement.
Tooling 2
Python 3.15 is added to the automatically generated classifiers.
Dependencies are determined with PEP 517 builds instead of parsing setup.py.
Fixes and other changes 109
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.
Fixes installation of artifacts not listed in the lockfile when the package source does not provide an artifact hash.
Fixes failures when updating a package that is a transitive dependency.
Fixes a false warning about a circular dependency.
Fixes garbled
--config-settingsin build backend failure messages.Fixes falsy configuration values being incorrectly treated as unset.
Allows
http-basicto be set for repository names containing periods.Fixes corruption of fetched data when part of it has already been cached.
Automatically adds a trailing slash to legacy repository URLs used for publishing when one is missing.
Makes the order of markers in the lock file deterministic.
Prevents an exception on Python 3.15+ when installed packages do not have a
METADATAfile.Prevents further packages from being installed when installation should be aborted.
Fixes resolution failures when a package has a marker.
Fixes activation for bash on Windows.
Retries after package registration instead of aborting.
Stops ignoring failed builds and uploading stale artifacts.
Suggests the correct command when a self command fails because of an outdated lock file.
Fixes failures on Windows when scheme paths are on different drives.
Fixes memory errors when calculating the hash of large wheels.
Fixes a performance regression in the wheel installer introduced in Poetry 2.3.3.
A post release with a local version identifier is no longer wrongly allowed by a > version constraint.
A != <version> constraint no longer wrongly disallows pre releases and post releases of the specified version.
An empty CONDA_PREFIX no longer causes Poetry to incorrectly detect an active virtualenv.
Dependency groups are no longer considered equal just because their resolved dependencies are equal.
Removing a dependency from a group that includes another group no longer adds other dependencies to the included group.
Git dependencies from annotated tags can now be updated.
Credentials are no longer corrupted during request preparation, preventing authentication failures with long tokens.
in and not in constraints are now allowed by specific compound constraints.
PEP 735 include-group entries are no longer lost when the same group also defines include-groups under [tool.poetry.group].
Unions of <value> not in <marker> constraints are no longer wrongly treated as always satisfied.
platform_release can now be parsed on Debian Trixie.
Using --no-interaction with --build no longer prompts for user interaction.
poetry init and poetry new no longer create the deprecated project.license format.
Using project.readme.text in pyproject.toml no longer results in broken metadata.
When .venv is a file rather than a directory, Poetry no longer prints an incomprehensible error message.
An empty VIRTUAL_ENV no longer causes Poetry to incorrectly detect an active virtualenv.
Fixed parsing of platform_release on Windows Server.
Cached information about each package is no longer always considered outdated.
The data-dir setting can now be set.
Dependencies required by several groups with different markers no longer get incorrect locked markers.
The correct wheels are chosen for installation when Poetry itself was not installed with free-threaded Python.
The implicit main group exists when explicitly declared without dependencies.
Poetry suggests clearing the cache when running a command with --no-cache solves an issue.
Adding dependencies works for PEP 735 dependency groups with include-group items.
The command returns the correct activation command for dash.
The generated pyproject.toml includes the readme field only if the readme file exists.
A method used by the plugin no longer creates non-deterministic markers.
Publishing uses the metadata of the build artifact rather than the project metadata.
Managing free-threaded Python versions is improved.
Removing dependencies works for PEP 735 dependency groups with include-group items.
Removing dependencies no longer leaves dangling include-group references in PEP 735 dependency groups.
Python and pip executables are correctly detected on Windows.
Markers using pre-release versions are parsed correctly.
The python.installation-dir setting can now be set.
poetry-core normalizes versions.
Invalid template variables now produce a comprehensible error message.
Setting allow-prereleases to false no longer permits prereleases when no other solution is found.
The author-name regular expression is no longer too restrictive.
Fixes parsing of HTTP(S) basic-auth credentials.
Fixes writing VCS URLs that do not comply with PEP 610.
Fixes installation of an extra package required by multiple extras.
Fixes sporadic installation failures for multiple dependencies from forked monorepos.
Fixes cloning git dependencies with extras when no branch was explicitly specified.
Fixes sporadic installation failures for multiple dependencies from the same git repository.
Git dependencies from tags now produce consistent hashes across dulwich versions.
Git URL paths now allow + characters.
The setting is no longer ignored for the implicit PyPI source.
Fixes use of the platlib directory belonging to the wrong Python.
Fixes broken pyproject.toml output when uncommon group names are used.
Fixes invalid constraints generated when adding a package with a local version specifier.
Fixes resolution of relative paths when building from another directory.
Using --directory or -C now actually switches the directory.
Fixes failure when virtualenvs.in-project is true.
Fixes failure to uninstall unrequested extras when installing without an existing lock file.
No longer tries to uninstall system site packages when the virtual environment uses system site packages.
Improves the output of poetry show <package>.
Local settings are no longer ignored for the implicit PyPI source.
Credentials are now passed when downloading a URL dependency.
Fixes errors when building a wheel in a nested output directory.
poetry 151 changes
Breaking changes 11
The --git option was removed; git dependencies can be specified directly in add.
The --path option was removed; path dependencies can be specified directly in add.
Use allow-prereleases instead of the deprecated allows-prereleases dependency setting.
The cache:clear command was renamed to cache clear.
The debug:info command was renamed to debug info.
The debug:resolve command was renamed to debug resolve.
The --develop option was removed from install.
The lock file format changed and may be incompatible with previous Poetry versions.
Configuration in pyproject.toml is now properly validated.
The self:update command was renamed to self update.
Virtualenv storage changed; names now depend on the project's path.
Deprecations 1
Using allows-prereleases in pyproject.toml is deprecated; use allow-prereleases instead.
New APIs and options 16
Poetry can now detect and use Conda environments.
Metadata now supports custom URLs.
Dependencies can now declare a specific source.
Adds a command to get basic information about the current environment.
Adds a command to list virtual environments associated with the current project.
Adds a command to delete virtual environments associated with the current project.
Adds a command to control the Python version used by the project.
Adds a command to export the lock file to other formats; requirements.txt is currently supported.
Dependencies now support full environment markers through the markers property.
Packages can now be specified on a per-format basis.
The get-poetry.py installer now supports a POETRY_HOME declaration.
Private repositories can now be declared as secondary repositories.
Custom certificate authorities and client certificates are now supported for private repositories.
PyPI can be disabled and another repository made the default.
Publishing to PyPI using API tokens is now supported.
URL dependencies are now supported.
Behavior and default changes 8
Git dependencies can be specified directly without the --git option.
Path dependencies can be specified directly without the --path option.
When only prereleases are available, add now automatically selects the latest prerelease.
The command can now update a dependency when an explicit constraint is given.
Licenses can now be identified by their full name.
The command now uses os.execvp() rather than spawning a new subprocess.
The shell command was improved.
When Poetry needs the system Python, it now calls sys.executable instead of the python command.
Fixes and other changes 15
Fixed the behavior of the ~= dependency constraint operator.
Fixed dependency resolution for conditional development dependencies.
Dependencies from custom indices are no longer constantly updated.
Fixed the behavior of the debug resolve --install option.
Fixed an error in env use when virtualenvs.in-project is activated.
Fixed handling of empty and any markers in unions of markers.
Files excluded via exclude are no longer included in distributions.
Fixed issues with handling extra markers in dependencies.
Git dependencies specified by branch or tag are now locked to a specific revision.
Fixed cases where invalid lock files were generated.
Fixed issues where path dependencies were treated as git dependencies.
Fixed handling of PEP 508 URL dependencies.
Installing Poetry-based packages no longer breaks with pip.
The run command now properly handles the -- separator.
Updating a specific dependency no longer removes its transitive extra dependencies.