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

Python version isn't applied properly #252

Closed
konstin opened this issue Oct 31, 2023 · 2 comments · Fixed by #282
Closed

Python version isn't applied properly #252

konstin opened this issue Oct 31, 2023 · 2 comments · Fixed by #282
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@konstin
Copy link
Member

konstin commented Oct 31, 2023

requirements.txt:

-c package_constraints.txt

pytest-aiohttp==1.0.5

package_constraints.txt:

aiohttp==3.8.5;python_version<'3.12'
aiohttp==3.9.0b0;python_version>='3.12'

This fails on python 3.9:

  × No solution found when resolving dependencies:
  ╰─▶ Because pytest-aiohttp 1.0.5 depends on aiohttp ∅ and root 0a0.dev0 depends on pytest-aiohttp 1.0.5, root 0a0.dev0 is forbidden.

It passes when removing aiohttp==3.9.0b0;python_version>='3.12', even though the markers shouldn't match there anyway

Part of #199

@konstin konstin added the bug Something isn't working label Oct 31, 2023
@charliermarsh charliermarsh added the good first issue Good for newcomers label Oct 31, 2023
@charliermarsh
Copy link
Member

Good find, this is a good first issue. We need to filter constraints in the resolver's get_dependencies method (see iter_requirements for an example of how to filter requirements).

@charliermarsh
Copy link
Member

\cc @zanieb if interested

@zanieb zanieb self-assigned this Nov 1, 2023
zanieb added a commit that referenced this issue Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants