Skip to content

Commit 7de568e

Browse files
Bump poetry from 1.8.5 to 2.0.1 (#1734)
* Bump poetry from 1.8.5 to 2.0.1 Bumps [poetry](https://github.com/python-poetry/poetry) from 1.8.5 to 2.0.1. - [Release notes](https://github.com/python-poetry/poetry/releases) - [Changelog](https://github.com/python-poetry/poetry/blob/main/CHANGELOG.md) - [Commits](python-poetry/poetry@1.8.5...2.0.1) --- updated-dependencies: - dependency-name: poetry dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Switch to `poetry sync` Since `poetry install --sync` has been deprecated in favour of the new `poetry sync` command. * Switch one fixture to using the `[project]` table So we have coverage of both the old and new style dependency table syntax. * Revert "Switch one fixture to using the `[project]` table" This reverts commit a0bb951. Since the `poetry_basic` fixture is also used for the old buildpack version test, and so fails when the Poetry 1.x version in the old buildpack can't read the Poetry v2 lockfile. We can land this later, once a historic buildpack version exists that uses a Poetry 2.x release. * Add changelog entry * Update test log output for new version --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ed Morley <[email protected]>
1 parent 3fede9b commit 7de568e

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Updated Poetry from 1.8.5 to 2.0.1. ([#1734](https://github.com/heroku/heroku-buildpack-python/pull/1734))
56

67
## [v274] - 2025-01-08
78

lib/poetry.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ function poetry::install_poetry() {
9999

100100
# Note: We cache site-packages since:
101101
# - It results in faster builds than only caching Poetry's download/wheel cache.
102-
# - It's safe to do so, since `poetry install --sync` fully manages the environment
103-
# (including e.g. uninstalling packages when they are removed from the lockfile).
102+
# - It's safe to do so, since `poetry sync` fully manages the environment (including
103+
# e.g. uninstalling packages when they are removed from the lockfile).
104104
#
105105
# With site-packages cached there is no need to persist Poetry's download/wheel cache in the build
106106
# cache, so we let Poetry write it to the home directory where it will be discarded at the end of
@@ -109,8 +109,7 @@ function poetry::install_poetry() {
109109
function poetry::install_dependencies() {
110110
local poetry_install_command=(
111111
poetry
112-
install
113-
--sync
112+
sync
114113
)
115114

116115
# On Heroku CI, all default Poetry dependency groups are installed (i.e. all groups minus those

requirements/poetry.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
poetry==1.8.5
1+
poetry==2.0.1

spec/hatchet/ci_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
-----> Using Python #{DEFAULT_PYTHON_MAJOR_VERSION} specified in .python-version
162162
-----> Installing Python #{DEFAULT_PYTHON_FULL_VERSION}
163163
-----> Installing Poetry #{POETRY_VERSION}
164-
-----> Installing dependencies using 'poetry install --sync'
164+
-----> Installing dependencies using 'poetry sync'
165165
Installing dependencies from lock file
166166
167167
Package operations: 5 installs, 0 updates, 0 removals
@@ -223,7 +223,7 @@
223223
-----> Restoring cache
224224
-----> Using cached install of Python #{DEFAULT_PYTHON_FULL_VERSION}
225225
-----> Installing Poetry #{POETRY_VERSION}
226-
-----> Installing dependencies using 'poetry install --sync'
226+
-----> Installing dependencies using 'poetry sync'
227227
Installing dependencies from lock file
228228
229229
No dependencies to install or update

spec/hatchet/poetry_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
remote: -----> Using Python #{DEFAULT_PYTHON_MAJOR_VERSION} specified in .python-version
1515
remote: -----> Installing Python #{DEFAULT_PYTHON_FULL_VERSION}
1616
remote: -----> Installing Poetry #{POETRY_VERSION}
17-
remote: -----> Installing dependencies using 'poetry install --sync --only main'
17+
remote: -----> Installing dependencies using 'poetry sync --only main'
1818
remote: Installing dependencies from lock file
1919
remote:
2020
remote: Package operations: 1 install, 0 updates, 0 removals
@@ -51,7 +51,7 @@
5151
remote: -----> Restoring cache
5252
remote: -----> Using cached install of Python #{DEFAULT_PYTHON_FULL_VERSION}
5353
remote: -----> Using cached Poetry #{POETRY_VERSION}
54-
remote: -----> Installing dependencies using 'poetry install --sync --only main'
54+
remote: -----> Installing dependencies using 'poetry sync --only main'
5555
remote: Installing dependencies from lock file
5656
remote:
5757
remote: No dependencies to install or update
@@ -78,7 +78,7 @@
7878
remote: - The Poetry version has changed from 1.8.4 to #{POETRY_VERSION}
7979
remote: -----> Installing Python #{LATEST_PYTHON_3_13}
8080
remote: -----> Installing Poetry #{POETRY_VERSION}
81-
remote: -----> Installing dependencies using 'poetry install --sync --only main'
81+
remote: -----> Installing dependencies using 'poetry sync --only main'
8282
remote: Installing dependencies from lock file
8383
remote:
8484
remote: Package operations: 1 install, 0 updates, 0 removals
@@ -107,7 +107,7 @@
107107
remote: - The package manager has changed from pip to poetry
108108
remote: -----> Installing Python #{DEFAULT_PYTHON_FULL_VERSION}
109109
remote: -----> Installing Poetry #{POETRY_VERSION}
110-
remote: -----> Installing dependencies using 'poetry install --sync --only main'
110+
remote: -----> Installing dependencies using 'poetry sync --only main'
111111
remote: Installing dependencies from lock file
112112
remote:
113113
remote: Package operations: 1 install, 0 updates, 0 removals
@@ -221,7 +221,7 @@
221221
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
222222
remote:
223223
remote: -----> Installing Poetry #{POETRY_VERSION}
224-
remote: -----> Installing dependencies using 'poetry install --sync --only main'
224+
remote: -----> Installing dependencies using 'poetry sync --only main'
225225
remote: Installing dependencies from lock file
226226
remote:
227227
remote: Package operations: 1 install, 0 updates, 0 removals
@@ -240,10 +240,10 @@
240240
it 'fails the build' do
241241
app.deploy do |app|
242242
expect(clean_output(app.output)).to include(<<~OUTPUT)
243-
remote: -----> Installing dependencies using 'poetry install --sync --only main'
243+
remote: -----> Installing dependencies using 'poetry sync --only main'
244244
remote: Installing dependencies from lock file
245245
remote:
246-
remote: pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.
246+
remote: pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock` to fix the lock file.
247247
remote:
248248
remote: ! Error: Unable to install dependencies using Poetry.
249249
remote: !

0 commit comments

Comments
 (0)