This version brings huge improvements to the dependency resolution speed.

New Features

Huge speed improvements in the dependency resolution process

In previous releases, the dependency resolution process could be extremely slow, especially for some packages like boto3 , due to the way the resolver works.

So, one of the focus of this release was to improve it so that the dependency resolution time could be deemed acceptable. And it seems it paid off.

As an example, we will take boto3 which was an extreme case: the dependency resolution time goes from about 30 minutes to about 11 seconds on a cold cache!

This is a huge improvement and should help you manage your projects more efficiently.

add command improvements.

The add command has been improved.

You can now use it to add git dependencies:

poetry add pendulum --git https://github.com/sdispater/pendulum.git

You can also add path (directories or files) dependencies:

poetry add my-package --path ../my-package/ poetry add my-package --path ../my-package/dist/my-package-0.1.0.tar.gz poetry add my-package --path ../my-package/dist/my_package-0.1.0.whl

Directory dependencies are now supported

You can now specify directory dependencies in your pyproject.toml file.

[tool.poetry.dependencies] my-package = { path = "../my-package/" }

Support for src/ layout in projects

poetry now supports the src/ layout in projects.

Note that the name of the package or module inside the src/ directory is still derived from the name of the project defined in the pyproject.toml file.

my-package/ └── src/ └── my_package/ └── __init__.py

Automatic detection of .venv virtualenvs

If you store you virtualenv inside your project in the form of a .venv directory, poetry will now automatically detect it and use it.

New cache:clear command

A new cache:clear command has been added, to help clear caches when something goes wrong.

This is useful in the rare cases where new distributions are added to a package after the cache has been generated (see https://github.com/python-poetry/poetry/issues/51).

You can clear caches for a specific version:

poetry cache:clear pypy:pendulum:1.4.4

or you can clear all caches for a specific repository:

poetry cache:clear pypy --all

Changes

Dependency resolution caches now use sha256 hashes.

Changed CLI error style.

Improved debugging of dependency resolution.

Poetry now attempts to find pyproject.toml not only in the directory it was invoked in, but in all its parents up to the root. This allows to run Poetry commands in project subdirectories.

not only in the directory it was invoked in, but in all its parents up to the root. This allows to run Poetry commands in project subdirectories. Made the email address for authors optional.

Fixes