-
Notifications
You must be signed in to change notification settings - Fork 88
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
Explicit installation of poetry export plugin breaks deployments with Poetry <1.6 #67
Comments
This is extremely weird, actually there are versions of https://pypi.org/project/poetry-plugin-export/#history ... and with 1.5.1 it is shipped inside Poetry, so this command should be a no-op. I wonder why it is trying to install the latest version of plugin in the first place. Maybe there is a different command to install the plugin and we are not using the right one? We could of course only run this for Poetry 1.6+, but version comparison in Bash is annoying... /cc @mm-felixh |
|
Here are the poetry docs. This section explicitly advises against using As a side-note the export plugin seems to have a troubled history with circular dependencies and such. Not sure if this factors into the problem. |
@bfontaine Does it work because of the |
@mm-matthias I used
|
Same issue here. Heroku deployments stopped working since the mentioned update. |
@mzdatawars you should be able to circumvent the issue by explicitely specifying the hash of the commit before the problematic one:
See https://devcenter.heroku.com/articles/buildpacks#buildpack-references |
Yes, that temporarily solves the issue. I will keep an eye for a longer term solution. Thank you! |
@bfontaine Interesting, here are my outputs (on Mac): % poetry self update 1.5.1
• Downgrading poetry-plugin-export (1.6.0 -> 1.5.0)
• Downgrading poetry (1.7.0 -> 1.5.1) % poetry self add poetry-plugin-export
Using version ^1.6.0 for poetry-plugin-export
Updating dependencies
Resolving dependencies... (0.0s)
Because no versions of poetry-plugin-export match >1.6.0,<2.0.0
and poetry-plugin-export (1.6.0) depends on poetry (>=1.6.0,<2.0.0), poetry-plugin-export (>=1.6.0,<2.0.0) requires poetry (>=1.6.0,<2.0.0).
So, because poetry-instance depends on both poetry (1.5.1) and poetry-plugin-export (^1.6.0), version solving failed. poetry self add poetry-plugin-export@*
Updating dependencies
Resolving dependencies... (0.2s)
No dependencies to install or update
Writing lock file So it appears that I had already It's also interesting that in your output there is this line Updating poetry (1.5.1 /home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.11/site-packages -> 1.5.1) I wonder why poetry itself should be upgraded and why it is listed as an upgrade from Then I re-installed poetry completely to make sure the output that I get is the same as with the % curl -sSL https://install.python-poetry.org | python3 - --uninstall
Removing Poetry (1.7.0)
% poetry
[...] No such file or directory
% curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1
[...] Poetry (1.5.1) is installed now. Great!
% poetry --version
Poetry (version 1.5.1)
% poetry self add poetry-plugin-export
Using version ^1.6.0 for poetry-plugin-export
Updating dependencies
Resolving dependencies... (0.1s)
Because no versions of poetry-plugin-export match >1.6.0,<2.0.0
and poetry-plugin-export (1.6.0) depends on poetry (>=1.6.0,<2.0.0), poetry-plugin-export (>=1.6.0,<2.0.0) requires poetry (>=1.6.0,<2.0.0).
So, because poetry-instance depends on both poetry (1.5.1) and poetry-plugin-export (^1.6.0), version solving failed.
% poetry self add poetry-plugin-export@*
Updating dependencies
Resolving dependencies... (3.0s)
No dependencies to install or update
Writing lock file Wondering why the % poetry self add poetry-plugin-export@latest
Using version ^1.6.0 for poetry-plugin-export
Updating dependencies
Resolving dependencies... (0.0s)
Because no versions of poetry-plugin-export match >1.6.0,<2.0.0
and poetry-plugin-export (1.6.0) depends on poetry (>=1.6.0,<2.0.0), poetry-plugin-export (>=1.6.0,<2.0.0) requires poetry (>=1.6.0,<2.0.0).
So, because poetry-instance depends on both poetry (1.5.1) and poetry-plugin-export (^1.6.0), version solving failed.
% poetry self add poetry-plugin-export@^1.5.0
Updating dependencies
Resolving dependencies... (0.2s)
No dependencies to install or update
Writing lock file So it seems that poetry tries to just install the latest version of the package. It probably does not take into account that its own version limits the version of the package that can be installed thus yielding the error. Why the wildcard suddenly makes everything work is something I do not really understand. So we could introduce the |
On a freshly installed poetry 1.7.0 I get this: $ poetry self add poetry-plugin-export@*
Updating dependencies
Resolving dependencies... Downloading https://files.pythonhosted.org/packages/a9/58/3feea94f12f25714f54a1cc14f3760977631d62c70952de3ab4bd0c6
Resolving dependencies... (2.5s)
No dependencies to install or update
Writing lock file
$ poetry self add poetry-plugin-export
The following packages are already present in the pyproject.toml and will be skipped:
• poetry-plugin-export
If you want to update it to the latest compatible version, you can use `poetry self update`.
If you prefer to upgrade it to the latest available version, you can use `poetry self add package@latest`.
Nothing to add.
$ poetry self add poetry-plugin-export@latest
Using version ^1.6.0 for poetry-plugin-export
Updating dependencies
Resolving dependencies... (0.2s)
No dependencies to install or update
Writing lock file Interestingly, there is no |
Ok, I understand the reason now. Quoting python-poetry/poetry#707
This seems to already have confused quite a few other people, e.g. python-poetry/poetry#6812 . So the |
…allation fix(compile): fix compatibility with older versions of poetry (#67)
@bfontaine @mzdatawars The fix from #67 is on master now. Can you check if this works for you? @bfontaine Thank you for the suggested fix and your console outputs! |
Thank you for the quick update; it works for me! |
Hello,
I use the latest version of this buildpack and since #66 it installs
poetry-plugin-export
, but this plugin requires Poetry 1.6 and so the deployment doesn’t work if one uses an older version.Would it be possible to install the plugin only if the Poetry version is >1.6?
The text was updated successfully, but these errors were encountered: