|
| 1 | +--- |
| 2 | +layout: single |
| 3 | +title: "Announcing Poetry 1.6.0" |
| 4 | +date: 2023-08-20 |
| 5 | +categories: [releases] |
| 6 | +tags: ["1.x", "1.6"] |
| 7 | +--- |
| 8 | + |
| 9 | +The Poetry team is pleased to announce the immediate availability of Poetry **1.6.0**. |
| 10 | + |
| 11 | +<!--more--> |
| 12 | + |
| 13 | +If you have a previous version of Poetry installed via the [official installer](/docs/#installation), |
| 14 | +getting Poetry **1.6.0** is as easy as: |
| 15 | + |
| 16 | +```bash |
| 17 | +$ poetry self update |
| 18 | +``` |
| 19 | + |
| 20 | +## Highlights |
| 21 | + |
| 22 | +### Official Poetry badge |
| 23 | + |
| 24 | +Poetry provides an official badge that can be used to indicate that a project is managed with Poetry. |
| 25 | +See the [documentation](docs/community/#badge) for details. |
| 26 | + |
| 27 | +### Support for repositories that do not provide a supported hash algorithm |
| 28 | + |
| 29 | +Some outdated package indices do only provide insecure MD5 hashes. |
| 30 | +Poetry 1.6 supports these repositories by calculating a SHA256 hash for the lockfile by itself. |
| 31 | + |
| 32 | +{{% note %}} |
| 33 | +If you care about security, you should still switch to modern package indices that provide secure hashes. |
| 34 | +{{% /note %}} |
| 35 | + |
| 36 | +### Full support for duplicate dependencies with overlapping markers |
| 37 | + |
| 38 | +Poetry 1.6 fully supports duplicate dependencies with overlapping markers. |
| 39 | +Therefore, it transforms a set of dependencies with overlapping markers into |
| 40 | +an equivalent set of dependencies mutually exclusive markers during dependency resolution. |
| 41 | +For example, |
| 42 | + |
| 43 | +```toml |
| 44 | +my-package = [ |
| 45 | + { version = ">=1.0" }, |
| 46 | + { version = "<2", markers = "python_version < '3.10'" }, |
| 47 | + { version = ">=1.5", markers = "sys_platform == 'win32'" }, |
| 48 | +] |
| 49 | +``` |
| 50 | + |
| 51 | +becomes |
| 52 | + |
| 53 | +```toml |
| 54 | +my-package = [ |
| 55 | + { version = ">=1.0", markers = "python_version >= '3.10' and sys_platform != 'win32'" }, |
| 56 | + { version = "<2", markers = "python_version < '3.10' and sys_platform != 'win32'" }, |
| 57 | + { version = ">=1.5", markers = "python_version >= '3.10' and sys_platform = 'win32'" }, |
| 58 | + { version = ">=1.5,<2", markers = "python_version < '3.10' and sys_platform == 'win32'" }, |
| 59 | +] |
| 60 | +``` |
| 61 | + |
| 62 | +so that for each of the resulting markers a valid solution can be found. |
| 63 | + |
| 64 | +If there is a conflict between the constraints of duplicate dependencies with overlapping markers, |
| 65 | +a comprehensive error message is displayed. |
| 66 | +Previously, overlapping markers could result in incorrect dependency resolutions. |
| 67 | + |
| 68 | +### Improved performance of `poetry lock` for certain edge cases |
| 69 | + |
| 70 | +Especially since the release of urllib3 2.0, Poetry has been affected |
| 71 | +by a dramatic performance regression under certain circumstances when boto3 or botocore |
| 72 | +were among the dependencies. That's because Poetry's algorithm decided to resolve |
| 73 | +dependencies with fewer candidates first to find conflicts faster |
| 74 | +(urllib3 has far fewer releases than boto3/botocore). However, all of the many versions |
| 75 | +of boto3/botocore are incompatible with `urllib3 >= 2.0`, so the algorithm has |
| 76 | +to try all of them before it chooses an older version of urllib3. |
| 77 | +Even though resolving dependencies with fewer candidates first will find conflicts |
| 78 | +a bit faster in some cases, it tends to be a lot slower in other cases. |
| 79 | +Therefore, we inverted the heuristics to resolve dependencies with more candidates first, |
| 80 | +which seems to be a bit slower in some cases, but a lot faster in other cases. |
| 81 | + |
| 82 | +## Other important Changes |
| 83 | + |
| 84 | +### Dropping support for Python 3.7 as runtime environment |
| 85 | + |
| 86 | +Poetry 1.6 drops runtime support for Python 3.7. |
| 87 | + |
| 88 | +{{% note %}} |
| 89 | +This change is about installing and running Poetry itself. |
| 90 | +Managing projects requiring Python 3.7 might still work. |
| 91 | +{{% /note %}} |
| 92 | + |
| 93 | +## Changelog |
| 94 | + |
| 95 | +### Added |
| 96 | + |
| 97 | +- **Add support for repositories that do not provide a supported hash algorithm** ([#8118](https://github.com/python-poetry/poetry/pull/8118)). |
| 98 | +- **Add full support for duplicate dependencies with overlapping markers** ([#7257](https://github.com/python-poetry/poetry/pull/7257)). |
| 99 | +- **Improve performance of `poetry lock` for certain edge cases** ([#8256](https://github.com/python-poetry/poetry/pull/8256)). |
| 100 | +- Improve performance of `poetry install` ([#8031](https://github.com/python-poetry/poetry/pull/8031)). |
| 101 | +- `poetry check` validates that specified `readme` files do exist ([#7444](https://github.com/python-poetry/poetry/pull/7444)). |
| 102 | +- Add a downgrading note when updating to an older version ([#8176](https://github.com/python-poetry/poetry/pull/8176)). |
| 103 | +- Add support for `vox` in the `xonsh` shell ([#8203](https://github.com/python-poetry/poetry/pull/8203)). |
| 104 | +- Add support for `pre-commit` hooks for projects where the pyproject.toml file is located in a subfolder ([#8204](https://github.com/python-poetry/poetry/pull/8204)). |
| 105 | +- Add support for the `git+http://` scheme ([#6619](https://github.com/python-poetry/poetry/pull/6619)). |
| 106 | + |
| 107 | +### Changed |
| 108 | + |
| 109 | +- **Drop support for Python 3.7** ([#7674](https://github.com/python-poetry/poetry/pull/7674)). |
| 110 | +- Move `poetry lock --check` to `poetry check --lock` and deprecate the former ([#8015](https://github.com/python-poetry/poetry/pull/8015)). |
| 111 | +- Change future warning that PyPI will only be disabled automatically if there are no primary sources ([#8151](https://github.com/python-poetry/poetry/pull/8151)). |
| 112 | + |
| 113 | +### Fixed |
| 114 | + |
| 115 | +- Fix an issue where `build-system.requires` were not respected for projects with build scripts ([#7975](https://github.com/python-poetry/poetry/pull/7975)). |
| 116 | +- Fix an issue where the encoding was not handled correctly when calling a subprocess ([#8060](https://github.com/python-poetry/poetry/pull/8060)). |
| 117 | +- Fix an issue where `poetry show --top-level` did not show top level dependencies with extras ([#8076](https://github.com/python-poetry/poetry/pull/8076)). |
| 118 | +- Fix an issue where `poetry init` handled projects with `src` layout incorrectly ([#8218](https://github.com/python-poetry/poetry/pull/8218)). |
| 119 | +- Fix an issue where Poetry wrote `.pth` files with the wrong encoding ([#8041](https://github.com/python-poetry/poetry/pull/8041)). |
| 120 | +- Fix an issue where `poetry install` did not respect the source if the same version of a package has been locked from different sources ([#8304](https://github.com/python-poetry/poetry/pull/8304)). |
| 121 | + |
| 122 | +### Docs |
| 123 | + |
| 124 | +- Document **official Poetry badge** ([#8066](https://github.com/python-poetry/poetry/pull/8066)). |
| 125 | +- Update configuration folder path for macOS ([#8062](https://github.com/python-poetry/poetry/pull/8062)). |
| 126 | +- Add a warning about pip ignoring lock files ([#8117](https://github.com/python-poetry/poetry/pull/8117)). |
| 127 | +- Clarify the use of the `virtualenvs.in-project` setting. ([#8126](https://github.com/python-poetry/poetry/pull/8126)). |
| 128 | +- Change `pre-commit` YAML style to be consistent with pre-commit's own examples ([#8146](https://github.com/python-poetry/poetry/pull/8146)). |
| 129 | +- Fix command for listing installed plugins ([#8200](https://github.com/python-poetry/poetry/pull/8200)). |
| 130 | +- Mention the `nox-poetry` package ([#8173](https://github.com/python-poetry/poetry/pull/8173)). |
| 131 | +- Add an example with a PyPI source in the pyproject.toml file ([#8171](https://github.com/python-poetry/poetry/pull/8171)). |
| 132 | +- Use `reference` instead of deprecated `callable` in the scripts example ([#8211](https://github.com/python-poetry/poetry/pull/8211)). |
| 133 | + |
| 134 | +### poetry-core ([`1.7.0`](https://github.com/python-poetry/poetry-core/releases/tag/1.7.0)) |
| 135 | + |
| 136 | +- Improve performance of marker handling ([#609](https://github.com/python-poetry/poetry-core/pull/609)). |
| 137 | +- Allow `|` as a value separator in markers with the operators `in` and `not in` ([#608](https://github.com/python-poetry/poetry-core/pull/608)). |
| 138 | +- Put pretty name (instead of normalized name) in metadata ([#620](https://github.com/python-poetry/poetry-core/pull/620)). |
| 139 | +- Update list of supported licenses ([#623](https://github.com/python-poetry/poetry-core/pull/623)). |
| 140 | +- Fix an issue where PEP 508 dependency specifications with names starting with a digit could not be parsed ([#607](https://github.com/python-poetry/poetry-core/pull/607)). |
| 141 | +- Fix an issue where Poetry considered an unrelated `.gitignore` file resulting in an empty wheel ([#611](https://github.com/python-poetry/poetry-core/pull/611)). |
| 142 | + |
| 143 | +### poetry-plugin-export ([`^1.5.0`](https://github.com/python-poetry/poetry-plugin-export/releases/tag/1.5.0)) |
| 144 | + |
| 145 | +- Fix an issue where markers for dependencies required by an extra were not generated correctly ([#209](https://github.com/python-poetry/poetry-plugin-export/pull/209)). |
0 commit comments