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

No solution found when resolving dependencies for split (platform_python_implementation == 'PyPy') #11151

Open
kdebrab opened this issue Feb 1, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@kdebrab
Copy link

kdebrab commented Feb 1, 2025

Summary

The error 'No solution found when resolving dependencies for split (platform_python_implementation == 'PyPy')' is raised even though the marker platform_python_implementation != 'PyPy' is used.

Minimal Reproducible Example

Following resolution failure looks like a bug to me:

Running uv lock (or uv sync or even uv run python) with following pyproject.toml:

[project]
name = "pythonproject"
version = "0.1.0"
requires-python = "==3.12.*"
dependencies = ["urllib3==2.3.0"]
optional-dependencies.test = [
"vcrpy==7.0.0 ; platform_python_implementation != 'PyPy'",
]

yields:

  x No solution found when resolving dependencies for split (platform_python_implementation == 'PyPy'):
  `-> Because only the following versions of urllib3{platform_python_implementation == 'PyPy'} are available:
          urllib3{platform_python_implementation == 'PyPy'}==0.3
          urllib3{platform_python_implementation == 'PyPy'}==1.0
          urllib3{platform_python_implementation == 'PyPy'}==1.0.1
          [...]
          urllib3{platform_python_implementation == 'PyPy'}==1.26.20
          urllib3{platform_python_implementation == 'PyPy'}>2
      and urllib3{platform_python_implementation == 'PyPy'}>=1.25,<=1.25.1 was yanked (reason: Broken release), we can conclude that urllib3{platform_python_implementation ==      
      'PyPy'}>=1.25,<=1.25.1 depends on urllib3<=1.24.3.
      And because vcrpy==7.0.0 depends on urllib3{platform_python_implementation == 'PyPy'}<2 and pythonproject[test] depends on vcrpy{platform_python_implementation !=
      'PyPy'}==7.0.0, we can conclude that pythonproject[test] depends on one of:
          urllib3<=1.24.3
          urllib3>=1.25.2,<=1.26.20

      And because your project depends on urllib3==2.3.0 and your project requires pythonproject[test], we can conclude that your project's requirements are unsatisfiable.

Note that especially And because vcrpy==7.0.0 depends on urllib3{platform_python_implementation == 'PyPy'}<2 and pythonproject[test] depends on vcrpy{platform_python_implementation != 'PyPy'}==7.0.0 seems a conflicting statement.

Platform

Windows 11

Version

uv 0.5.26 (5ef3d51 2025-01-30)

Python version

Python 3.12.8

@kdebrab kdebrab added the bug Something isn't working label Feb 1, 2025
@charliermarsh
Copy link
Member

Try adding:

[tool.uv]
environments = ["platform_python_implementation != 'PyPy'"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants