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

"markers" don't respect "target Python" configuration #11010

Closed
1 task done
mitchhentges opened this issue Apr 4, 2022 · 2 comments
Closed
1 task done

"markers" don't respect "target Python" configuration #11010

mitchhentges opened this issue Apr 4, 2022 · 2 comments
Labels
resolution: duplicate Duplicate of an existing issue/PR

Comments

@mitchhentges
Copy link

Description

I would like to download all the packages listed in a requirements file using a specific python version. However, the --python-version value isn't respected by marker evaluation.

Expected behavior

I think that pip should use specific configuration --python-version, --implementation, etc when resolving environment markers.
So, when the specified requirements.txt is used with pip download ... --python-version 3.6.15, it should download idna==2.10

pip version

22.0.4

Python version

3.9.12

OS

macOS Monterey 12.3 M1

How to Reproduce

  1. Create a requirements file with the following contents:
idna==2.10; python_version < "3.7"

  1. Run pip download -r requirements.txt --no-deps --dest . --abi none --platform any --python-version 3.6.15
  2. pip outputs the following:
Ignoring idna: markers 'python_version < "3.7"' don't match your environment

Output

(poetry-env) mhentges@mhentges-39603 poetry-project % cat requirements.txt 
idna==2.10; python_version < "3.7"
(poetry-env) mhentges@mhentges-39603 poetry-project % pip download -r requirements.txt --no-deps --dest . --abi none --platform any --python-version 3.6.15
Ignoring idna: markers 'python_version < "3.7"' don't match your environment

Code of Conduct

@mitchhentges mitchhentges added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Apr 4, 2022
@mitchhentges
Copy link
Author

Additional details:

@uranusjr
Copy link
Member

Duplicate of #10050.

@uranusjr uranusjr added resolution: duplicate Duplicate of an existing issue/PR and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Apr 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants