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

uv versions 0.2.19 and 0.2.20 not respecting wheel dependecies #4898

Closed
atrbgithub opened this issue Jul 8, 2024 · 6 comments · Fixed by #4900
Closed

uv versions 0.2.19 and 0.2.20 not respecting wheel dependecies #4898

atrbgithub opened this issue Jul 8, 2024 · 6 comments · Fixed by #4900
Assignees
Labels
bug Something isn't working resolver Related to the package resolver

Comments

@atrbgithub
Copy link

Given the following:

python --version
Python 3.8.19

uv --version
uv 0.2.20

The error is:

uv pip install dvc==3.42.0
error: No virtual environment found
sh-5.1$ uv venv
Using Python 3.8.19 interpreter at: /some/location/bin/python3
Creating virtualenv at: .venv
sh-5.1$ uv pip install dvc==3.42.0
error: Failed to download and build `voluptuous==0.15.1`
  Caused by: Failed to build: `voluptuous==0.15.1`
  Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit status: 1
--- stdout:

--- stderr:
Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "/home/a_home_dir/.cache/uv/environments-v0/.tmpvwToiO/lib/python3.8/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
  File "/home/a_home_dir/.cache/uv/environments-v0/.tmpvwToiO/lib/python3.8/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
    self.run_setup()
  File "/home/a_home_dir/.cache/uv/environments-v0/.tmpvwToiO/lib/python3.8/site-packages/setuptools/build_meta.py", line 497, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/home/a_home_dir/.cache/uv/environments-v0/.tmpvwToiO/lib/python3.8/site-packages/setuptools/build_meta.py", line 313, in run_setup
    exec(code, locals())
  File "<string>", line 7, in <module>
  File "/home/a_home_dir/.cache/uv/built-wheels-v3/pypi/voluptuous/0.15.1/MQJft_QmRPeFdMipU2XVd/voluptuous-0.15.1.tar.gz/./voluptuous/__init__.py", line 78, in <module>
    from voluptuous.schema_builder import *
  File "/home/a_home_dir/.cache/uv/built-wheels-v3/pypi/voluptuous/0.15.1/MQJft_QmRPeFdMipU2XVd/voluptuous-0.15.1.tar.gz/./voluptuous/schema_builder.py", line 13, in <module>
    from functools import cache, wraps
ImportError: cannot import name 'cache' from 'functools' (/some/location/lib/python3.8/functools.py)
---

This also fails with uv 0.2.19

It works with 0.2.18, which installs the correct supported package:

 + voluptuous==0.14.2

Rather than attempting to install:

voluptuous==0.15.1

As this does not support python 3.8.

@zanieb
Copy link
Member

zanieb commented Jul 8, 2024

Thanks for the report. We'll look into this.

@zanieb zanieb added bug Something isn't working resolver Related to the package resolver labels Jul 8, 2024
@zanieb
Copy link
Member

zanieb commented Jul 8, 2024

I'm a bit suspicious of #4705 / #4707. Probably related to #4885.

@charliermarsh
Copy link
Member

I haven't been able to repro this yet with echo "dvc==3.42.0" | uv pip compile - --python-version 3.8.

@zanieb
Copy link
Member

zanieb commented Jul 8, 2024

I reproduced with

uv venv --python 3.8 --preview
uv pip install dvc==3.42.0

log.txt

@charliermarsh
Copy link
Member

Okay, I think this is a prefetching problem. We're no longer filtering by Requires-Python in the prefetching codepath.

@charliermarsh
Copy link
Member

Because it was removed from the version map but not "re-added" there.

@charliermarsh charliermarsh self-assigned this Jul 8, 2024
charliermarsh added a commit that referenced this issue Jul 8, 2024
## Summary

This is fallout from #4705. We need
to respect `requires-python` in the prefetch code to avoid building
unsupported distributions.

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

Successfully merging a pull request may close this issue.

3 participants