Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump poetry from 1.8.5 to 2.0.1 #1734

Merged
merged 6 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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