Skip to content

Commit

Permalink
Bump poetry from 1.8.5 to 2.0.1 (#1734)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dependabot[bot] and edmorley authored Jan 13, 2025
1 parent 3fede9b commit 7de568e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

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

## [v274] - 2025-01-08

Expand Down
7 changes: 3 additions & 4 deletions lib/poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ function poetry::install_poetry() {

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

# On Heroku CI, all default Poetry dependency groups are installed (i.e. all groups minus those
Expand Down
2 changes: 1 addition & 1 deletion requirements/poetry.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
poetry==1.8.5
poetry==2.0.1
4 changes: 2 additions & 2 deletions spec/hatchet/ci_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
-----> Using Python #{DEFAULT_PYTHON_MAJOR_VERSION} specified in .python-version
-----> Installing Python #{DEFAULT_PYTHON_FULL_VERSION}
-----> Installing Poetry #{POETRY_VERSION}
-----> Installing dependencies using 'poetry install --sync'
-----> Installing dependencies using 'poetry sync'
Installing dependencies from lock file
Package operations: 5 installs, 0 updates, 0 removals
Expand Down Expand Up @@ -223,7 +223,7 @@
-----> Restoring cache
-----> Using cached install of Python #{DEFAULT_PYTHON_FULL_VERSION}
-----> Installing Poetry #{POETRY_VERSION}
-----> Installing dependencies using 'poetry install --sync'
-----> Installing dependencies using 'poetry sync'
Installing dependencies from lock file
No dependencies to install or update
Expand Down
14 changes: 7 additions & 7 deletions spec/hatchet/poetry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
remote: -----> Using Python #{DEFAULT_PYTHON_MAJOR_VERSION} specified in .python-version
remote: -----> Installing Python #{DEFAULT_PYTHON_FULL_VERSION}
remote: -----> Installing Poetry #{POETRY_VERSION}
remote: -----> Installing dependencies using 'poetry install --sync --only main'
remote: -----> Installing dependencies using 'poetry sync --only main'
remote: Installing dependencies from lock file
remote:
remote: Package operations: 1 install, 0 updates, 0 removals
Expand Down Expand Up @@ -51,7 +51,7 @@
remote: -----> Restoring cache
remote: -----> Using cached install of Python #{DEFAULT_PYTHON_FULL_VERSION}
remote: -----> Using cached Poetry #{POETRY_VERSION}
remote: -----> Installing dependencies using 'poetry install --sync --only main'
remote: -----> Installing dependencies using 'poetry sync --only main'
remote: Installing dependencies from lock file
remote:
remote: No dependencies to install or update
Expand All @@ -78,7 +78,7 @@
remote: - The Poetry version has changed from 1.8.4 to #{POETRY_VERSION}
remote: -----> Installing Python #{LATEST_PYTHON_3_13}
remote: -----> Installing Poetry #{POETRY_VERSION}
remote: -----> Installing dependencies using 'poetry install --sync --only main'
remote: -----> Installing dependencies using 'poetry sync --only main'
remote: Installing dependencies from lock file
remote:
remote: Package operations: 1 install, 0 updates, 0 removals
Expand Down Expand Up @@ -107,7 +107,7 @@
remote: - The package manager has changed from pip to poetry
remote: -----> Installing Python #{DEFAULT_PYTHON_FULL_VERSION}
remote: -----> Installing Poetry #{POETRY_VERSION}
remote: -----> Installing dependencies using 'poetry install --sync --only main'
remote: -----> Installing dependencies using 'poetry sync --only main'
remote: Installing dependencies from lock file
remote:
remote: Package operations: 1 install, 0 updates, 0 removals
Expand Down Expand Up @@ -221,7 +221,7 @@
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
remote:
remote: -----> Installing Poetry #{POETRY_VERSION}
remote: -----> Installing dependencies using 'poetry install --sync --only main'
remote: -----> Installing dependencies using 'poetry sync --only main'
remote: Installing dependencies from lock file
remote:
remote: Package operations: 1 install, 0 updates, 0 removals
Expand All @@ -240,10 +240,10 @@
it 'fails the build' do
app.deploy do |app|
expect(clean_output(app.output)).to include(<<~OUTPUT)
remote: -----> Installing dependencies using 'poetry install --sync --only main'
remote: -----> Installing dependencies using 'poetry sync --only main'
remote: Installing dependencies from lock file
remote:
remote: pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.
remote: pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock` to fix the lock file.
remote:
remote: ! Error: Unable to install dependencies using Poetry.
remote: !
Expand Down

0 comments on commit 7de568e

Please sign in to comment.