|
| 1 | +--- |
| 2 | +layout: single |
| 3 | +title: "Announcing Poetry 2.4.0" |
| 4 | +date: 2026-05-03 |
| 5 | +categories: [releases] |
| 6 | +tags: ["2.x", "2.4"] |
| 7 | +--- |
| 8 | + |
| 9 | +The Poetry team is pleased to announce the immediate availability of Poetry **2.4.0**. |
| 10 | + |
| 11 | +<!--more--> |
| 12 | + |
| 13 | +If you have a previous version of Poetry installed via `pipx`, |
| 14 | +getting Poetry **2.4.0** is as easy as: |
| 15 | + |
| 16 | +```bash |
| 17 | +$ pipx upgrade poetry |
| 18 | +``` |
| 19 | + |
| 20 | +If you used the [official installer](/docs/#installation), you can run: |
| 21 | + |
| 22 | +```bash |
| 23 | +$ poetry self update |
| 24 | +``` |
| 25 | + |
| 26 | +## Highlights |
| 27 | + |
| 28 | +### Adding support for dependency cooldowns |
| 29 | + |
| 30 | +Poetry 2.4.0 introduces a new `solver.min-release-age` setting that lets you require |
| 31 | +package releases to be a certain number of days old before they are considered during |
| 32 | +dependency resolution. |
| 33 | + |
| 34 | +This can help protect against supply chain attacks where a compromised release is |
| 35 | +published and detected only hours or days later. For example, if you set |
| 36 | +`solver.min-release-age` to `7`, Poetry will only consider versions for which all known |
| 37 | +distribution files are at least seven days old. |
| 38 | + |
| 39 | +```bash |
| 40 | +poetry config solver.min-release-age 7 |
| 41 | +``` |
| 42 | + |
| 43 | +If you need newer releases for selected packages or sources, you can opt out of the |
| 44 | +filter with `solver.min-release-age-exclude` and `solver.min-release-age-exclude-source`: |
| 45 | + |
| 46 | +```bash |
| 47 | +poetry config solver.min-release-age-exclude "my-package,other-package" |
| 48 | +poetry config solver.min-release-age-exclude-source "internal-pypi,https://packages.example.com/simple/" |
| 49 | +``` |
| 50 | + |
| 51 | +{{% note %}} |
| 52 | +This filter can only be enforced for package sources that expose file upload timestamps. |
| 53 | +If a source does not provide upload times for a release, that release is not filtered out |
| 54 | +by this setting. |
| 55 | +{{% /note %}} |
| 56 | + |
| 57 | +## Upcoming Changes |
| 58 | + |
| 59 | +### Defaulting to `setuptools` instead of `poetry-core` if no build system is defined |
| 60 | + |
| 61 | +Per [PEP 517](https://peps.python.org/pep-0517/), a build tool should fall back to `setuptools` if no build system is |
| 62 | +defined in the `[build-system]` section of `pyproject.toml`. However, to avoid immediate disruption, Poetry will |
| 63 | +currently issue a **warning** in such cases and continue using the built-in `poetry-core` backend by default. |
| 64 | +This behavior will change in a future minor release so that Poetry will default to `setuptools` |
| 65 | +if no `[build-system]` section is defined. |
| 66 | + |
| 67 | +## Changelog |
| 68 | + |
| 69 | +# TODO |
0 commit comments