-
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
Dev dependency get locked as main dependency when constraint is a list #599
Comments
I was mistaken on the Poetry version, this issue was found on the latest master but also exists for the |
Also mistaken about violating docs, docs were talking about a single multiconstraint, this example is multiple exact constraints. |
It also happens with a git dependency with a specified commit. |
Also got hit by this one, using git commit pinning. |
I also hit this issue today with git commits. Is this just a bug or something that's wrong by design? |
It seems the code here https://github.com/sdispater/poetry/blob/c497a5d836d72395bda8476edb24bacc698ea9b7/poetry/packages/package.py#L251 does not forward
@zyv fyi |
|
Oh I'm working on a "fix" locally... am I racing against anyone else? @drunkwcodes are you a contributor or a user like me? Do I add |
@jimbo1qaz A user just had a glance at this. And yes. |
will my PR be reviewed and likely accepted? Should I ask questions in this issue, or create a PR and force-push to fix reviews there? do I remove |
@jimbo1qaz I will make a PR if you are not working on this. No. I will just add it and don't remove anything. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
is this still broken? i didn't check. Anyway I rebased #996 on develop, fixed merge conflicts, and force-pushed. |
@jimbo1qaz Yes, this is still happening with a git dependency with a specified commit |
Fixed in #1725. This issue should be closed. |
Thanks a lot for coming back and reporting it as closed 👍 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
While perusing the Poetry source code I stumbled across this block that looked like it could cause a bug. When a member of
dev-dependencies
has multiple constraints expressed as a list (like this),poetry lock
will lock it as amain
dependency (like this).When reading in a
.pyproject.toml
file, Poetry will internally add a Dependency to a Package that gets initialized from reading apyproject.toml
file.Steps to reproduce
$ git clone https://github.com/sdispater/poetry.git
keyring = ["16.0.0", "16.0.0"]
to[tool.poetry.dev-dependencies]
inpyproject.toml
$ poetry lock
poetry.lock
forkeyring
, see thatcategory = "main"
or in one line:
produces for me:
This particular example also violates the
!!!note
found in the docs in that identical constraints do not cause an error.The text was updated successfully, but these errors were encountered: