-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Poetry 2.1 breaks -- (double-dash) handling #10204
Comments
Correct. More specifically; poetry/src/poetry/console/application.py Lines 431 to 434 in 79c207b
From my pov, the new behavior is more unexpected than the previous. But nonetheless, it does break what might have worked before by some force fiddling. |
This was a breaking change for me too. In our CI pipeline we run something like Updating the command to |
Oh, great, thank you. This also works for me with the dashes after the run command. |
Let's put it this way, the old way of parsing was more error prone than what we have today. And, if we go by bash docs I'd say what we need is some update to the doc clarifying this for users who relied on the double dash for the command executed by run. |
Description
Poetry 2.1 breaks to handling of the -- option.
Example:
Here you can see how Poetry 2.0.1 behaves:
This is OK. Even with a -- at the end the --version shows my tox version.
Then I upgrade Poetry to 2.1.1
Now, you can see that with the -- option the --version shows the Poetry version instead of the tox Version.
This behaviour breaks our CI/CD pipeline when working with tox {posargs}
For example if we have a tox environment:
When we try to call it with posargs we get the following error:
This is because the -- option passes the -e option back to Poetry instead leaving it with tox.
This worked pretty well with Poetry 2.1.1
Workarounds
I had to pin the Poetry version back to v2.0.1 in our CI/CD pipeline to make it work again.
Poetry Installation Method
pipx
Operating System
Windows 11 / WSL / Ubuntu 22.04
Poetry Version
Poetry (version 2.1.1)
Poetry Configuration
Python Sysconfig
sysconfig.log
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log
The text was updated successfully, but these errors were encountered: