Announcing Poetry 1.4.0

Published on February 27, 2023 in Releases with tags 1.X 1.4

The Poetry team is pleased to announce the immediate availability of Poetry 1.4.0.

If you have a previous version of Poetry installed via the official installer, getting Poetry 1.4.0 is as easy as:

$ poetry self update

Highlights #

Faster installation of packages #

Poetry 1.4 introduces a new modern installer, which is enabled by default. The new installer is independent from pip and faster than the former default installer, especially if the packages are already cached. In contrast, to former installers it does not compile byte code by default. (This is done automatically when the installed packages are used for the first time.) In order to compile byte code on installation, you can run poetry install --compile. If you encounter issues, you can deactivate the new installer by setting installer.modern-installation to false.

Further, the oldest installer (setting experimental.new-installer to false) has been deprecated, so there are only two non-deprecated installers available (the new installer and the former default installer). Despite its name experimental.new-installer=true had been the stable default installer for some releases now.

Validate path dependencies during use instead of during construction #

Path dependencies are not validated during construction anymore but only during use. In other words, path dependencies are not validated if they are contained only in a group that is not selected for installation. Further, poetry lock --no-update does not fail anymore for renamed path dependencies.

Other important Changes #

generate-setup-file = false #

Poetry has long generated a stub setup.py file for compatibility with older versions of pip (specifically, pip versions older than 19, the first to introduce support for PEP 517). Users who did not want Poetry to do this have long been able to opt out with the generate-setup-file option in tool.poetry.build.

As already announced in the last blog post, Poetry 1.4 inverts this behavior, turning off generation of setup.py by default. This change should be transparent to nearly all users, as versions of pip supporting alternate build systems natively have been available for nearly four years.

Users who wish to maintain the legacy behavior may explicitly do so in their pyproject.toml; however, users should keep in mind that this option will be deprecated and eventually removed in future versions of Poetry:

[tool.poetry.build]
generate-setup-file = true

Changelog #

Added #

Changed #

Fixed #

Docs #

poetry-core (1.5.1) #

poetry-plugin-export (^1.3.0) #