This version brings a brand new dependency resolver which is more consistent, reliable and faster.

New Features

Brand new dependency resolver

The dependency resolver has been rewritten from scratch to make it more resilient and reliable.

It solves conflicts in a faster and smarter way to be as exhaustive as possible.

It also comes with much clearer error messages when no valid solution can be found. Here are some examples:

[SolverProblemError]
Because demo depends on django (2.0.1) which requires Python >=3.4,
version solving failed.
[SolverProblemError]
Because masonite (1.6.7) depends on both cryptography (2.1.4) and cryptography (2.2.2),
 masonite is forbidden.
So, because demo depends on masonite (1.6.7), version solving failed.

New init command

The init command has been added.

It helps you create a pyproject.toml file interactively by prompting you to provide basic information about your package.

poetry init

New develop command

The develop command installs the current project in development/editable mode.

This is similar to pip install -e . when using pip.

New settings.virtualenvs.in-project setting

The new settings.virtualenvs.in-project setting tells poetry to create new project virtualenvs in the project's directory (.venv directory).

You can set it with the config command:

poetry config settings.virtualenvs.in-project true

If you no longer want this behavior, you can unset it:

poetry config settings.virtualenvs.in-project --unset

Other new features

  • Added the --extras and --python options to debug:resolve to help debug dependency resolution.
  • Added a --src option to the new command to create an src layout.
  • Added support for specifying the platform for dependencies.
  • Added the --python option to the add command.
  • Added the --platform option to the add command.

Changes

publish command

The publish command no longer builds the project by default.

The proper workflow now is to always use build before publish.

You can, however, use the --build option to retrieve the previous behavior.

show command

The show command has been improved to make it easier to check if packages are properly installed.

script and run command

The script command is now deprecated. You can now use run instead.

Other changes

  • Improved support for private repositories.
  • Expanded version constraints now keep the original version's precision.
  • The lock file hash no longer uses the project's name and version.
  • The LICENSE file, or similar, is now automatically added to the built packages.   

Fixes

  • Fixed the dependency resolver selecting incompatible packages.
  • Fixed override of dependency with dependency with extras in dev-dependencies.
View Comments