Change8

2.1.0

Breaking Changes
📦 poetryView on GitHub →
1 breaking8 features🐛 19 fixes1 deprecations🔧 8 symbols

Summary

This release introduces experimental Python installation management, makes the build system agnostic, and changes the default project layout to 'src'. It also includes significant performance improvements for dependency locking and numerous bug fixes related to PEP compliance and environment handling.

⚠️ Breaking Changes

  • The 'poetry new' command now defaults to the 'src' layout. Projects relying on the previous flat layout default will need to explicitly configure the structure or move files if they expected the old behavior.

Migration Steps

  1. Update scripts using 'poetry new' to account for the new 'src' layout default.
  2. Update 'poetry source add' commands to include a '--priority' flag to avoid deprecation warnings.

✨ New Features

  • Made 'build' command build-system agnostic.
  • Added '--config-settings' option to 'poetry build'.
  • Added support for defining 'config-settings' when building dependencies.
  • Added experimental commands to manage Python installations.
  • Integrated 'findpython' to locate Python interpreters.
  • Added '--no-truncate' option to 'poetry show'.
  • Re-added support for passwords with empty usernames.
  • Improved error messages across several commands.

🐛 Bug Fixes

  • Fixed handling of global options positioned after command options.
  • Fixed build-system dependency conflicts when building from source.
  • Fixed 'poetry init' interactive package search on PyPI.
  • Fixed incorrect passing of '@latest' descriptor to core requirement parser.
  • Fixed Boolean environment variable parsing (e.g., 'True' vs 'true').
  • Fixed misleading error message in 'poetry env activate'.
  • Fixed lock file updates when adding optional dependencies via 'poetry add --optional'.
  • Fixed race condition by ensuring 'pip' is installed/updated before other dependencies.
  • Fixed freezing issue when multiple threads unlock 'keyring' simultaneously.
  • Fixed incorrect locking of markers with extras.
  • Fixed resolution of self-referential extras.
  • Fixed execution issues when running Poetry from a zipapp.
  • Fixed permission errors when using system environment without write access.
  • Fixed locking of dependency versions incompatible with project python constraints.
  • Fixed false reporting of Python range compatibility issues.
  • Fixed ignored extras when the same dependency is specified in multiple groups.
  • Fixed PEP 440 inconsistency with post releases in poetry-core.
  • Fixed silent discarding of invalid URI tokens in PEP 508 strings.
  • Fixed inclusion of __pycache__ and .pyc files in sdists and wheels.

🔧 Affected Symbols

poetry buildpoetry newpoetry showpoetry initpoetry addpoetry env activatefindpythonpoetry-core

⚡ Deprecations

  • Adding sources without specifying a '--priority' is now deprecated.