Change8

2.3.0

Breaking Changes
📦 poetryView on GitHub →
2 breaking12 features🐛 13 fixes1 deprecations🔧 10 symbols

Summary

This release drops support for Python 3.9, changes the default for installer re-resolution, and introduces significant improvements for PEP 735 dependency groups and artifact publishing.

⚠️ Breaking Changes

  • Support for Python 3.9 has been dropped. Users must upgrade to Python 3.10 or newer.
  • The default value for the configuration setting `installer.re-resolve` has been changed from `true` to `false`. If you relied on automatic re-resolution during installation, you must explicitly set `installer.re-resolve = true` in your configuration.

Migration Steps

  1. If you relied on automatic re-resolution during dependency installation, update your configuration to explicitly set `installer.re-resolve = true`.
  2. Update your Python environment to Python 3.10 or newer.

✨ New Features

  • Added support for exporting `pylock.toml` files when using `poetry-plugin-export`.
  • Support for specifying build constraints for dependencies has been added.
  • Support for publishing artifacts whose version is determined dynamically by the build-backend is now available.
  • Support for editable project plugins has been introduced.
  • The `requires-poetry` check is now performed before any other validation.
  • Validation for the content of `project.readme` is now performed when running `poetry check`.
  • The `poetry cache clear` command now supports clearing all caches by omitting the cache name argument.
  • Automatic cache updates are performed for packages where locked files differ from cached files.
  • A suggestion to clear the cache is provided if running a command with `--no-cache` resolves an issue.
  • When running `poetry init` in an existing directory, Poetry now suggests using `poetry init` instead of failing with `poetry new`.
  • Added support for `poetry publish --skip-existing` for newer Nexus OSS versions.
  • The path to Poetry's own Python interpreter is now shown in `poetry debug info`.

🐛 Bug Fixes

  • Fixed an issue where `poetry remove` failed for PEP 735 dependency groups containing `include-group` items.
  • Fixed an issue where `poetry remove` left dangling `include-group` references in PEP 735 dependency groups.
  • Fixed an issue where `poetry add` failed for PEP 735 dependency groups containing `include-group` items.
  • Fixed an issue where PEP 735 dependency groups were not correctly factored into the lock file hash.
  • Fixed an issue where incorrect markers were locked for dependencies required by multiple groups with differing markers.
  • Fixed an issue that caused non-deterministic markers to be created in a method utilized by `poetry-plugin-export`.
  • Fixed an issue where incorrect wheels were selected for installation in free-threaded Python environments if Poetry itself was built without free-threading support.
  • Fixed an issue where `poetry publish` used the project's metadata instead of the metadata specific to the build artifact.
  • Fixed `poetry env use` to fail correctly when the requested Python version is not supported by the project, instead of silently using another version.
  • Fixed `poetry env activate` to return the correct command for the `dash` shell.
  • Fixed an issue preventing configuration values for `data-dir` and `python.installation-dir` from being set.
  • Fixed detection of Python and pip executables on Windows.
  • Fixed an incomprehensible error message caused by invalid template variables in `virtualenvs.prompt`.

Affected Symbols

⚡ Deprecations

  • The internal utility `poetry.utils._compat.metadata` is deprecated in favor of using the standard library's `importlib.metadata`.