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

Adding an extra via the cli does not generate the required markers in the lockfile #10041

Open
abn opened this issue Jan 13, 2025 · 0 comments
Open
Labels
area/deps Related to representing and locking dependencies kind/bug Something isn't working as expected

Comments

@abn
Copy link
Member

abn commented Jan 13, 2025

The issue can be reproduced as shown here. Should note that running poetry lock again fixes the issue.

podman run --rm -i --entrypoint bash python:latest <<EOF
set -xe
python -m pip install --disable-pip-version-check --root-user-action ignore -q poetry
poetry new foobar
pushd foobar
poetry add -q --optional=http httpx
grep "http" poetry.lock || :
poetry lock
grep "http" poetry.lock || :
EOF
console.log

+ python -m pip install --disable-pip-version-check --root-user-action ignore -q poetry
+ poetry new foobar
Created package foobar in foobar
/foobar /
+ pushd foobar
+ poetry add -q --optional=http httpx
+ grep http poetry.lock
name = "httpcore"
    {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"},
    {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"},
http2 = ["h2 (>=3,<5)"]
name = "httpx"
    {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"},
    {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"},
httpcore = "==1.*"
http2 = ["h2 (>=3,<5)"]
+ poetry lock
Resolving dependencies...

Writing lock file
+ grep http poetry.lock
markers = "extra == \"http\""
markers = "extra == \"http\""
markers = "extra == \"http\""
name = "httpcore"
markers = "extra == \"http\""
    {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"},
    {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"},
http2 = ["h2 (>=3,<5)"]
name = "httpx"
markers = "extra == \"http\""
    {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"},
    {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"},
httpcore = "==1.*"
http2 = ["h2 (>=3,<5)"]
markers = "extra == \"http\""
markers = "extra == \"http\""
http = ["httpx"]

@abn abn added kind/bug Something isn't working as expected area/deps Related to representing and locking dependencies labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deps Related to representing and locking dependencies kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant