-
Notifications
You must be signed in to change notification settings - Fork 762
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
ModuleNotFoundError: No module named 'setuptools.command.test' #5551
Comments
setuptools 72.0.0 (released 3 hours ago) has caused certain Python packages to break (pypa/setuptools#4519). This is compounded by uv's installation of the latest version of setuptools during venv setup. |
This isn't uv's fault. See pypa/setuptools#4519 (comment) , but use Edit: oops, |
@hauntsaninja Thank you for the help. That works! Let me close the issue. |
I'd still be interested if any uv folks have ideas for how to improve reproducibility of isolated build envs. Here's one (probably dumb) suggestion. |
it seems that UV_CONSTRAINT or Using this as setuptools-constraint.txt
Seems uv still uses the latest setuptools
|
Oops, so it is:
(same deal with e.g. @yu-iskw could you re-open? |
@hauntsaninja @delfick Indeed I didn't solve the issue only with
|
if you do a Cause adding those extra things to the constraints doesn't make a difference for me |
Using the |
Improved version which restricts just setuptools without blocking other upgrades. This had to be done by disabling build isolation, see astral-sh/uv#5551. Should be removed once celery/django-celery-beat#772 is fixed.
Can confirm, this fixed the issue for us as well. |
(the |
We should lock build environments, see #5190 |
Can also confirm that this works as a temporary workaround, after pinning |
How about add the version constraint bot to use setuptools 72.0.0 until the issue is resolved? It might be hassle for each uv user to apply the workaround to its environment. |
@yu-iskw It would need to be <72.0.0, right? As that is the version that introduces the breaking changes. |
@josephd-envsys that's right. I totally understand the issue should be only on the setuptools side. And I'm not sure how the setuptools community handle it. But the impact of the issue is quite broad. My proposal should be a tentative solution in uv. But implementing the tentative workaround in uv would be useful for many uv users. |
@yu-iskw quite. Have a look at the issue over at setuptools: pypa/setuptools#4519 TLDR:
|
Hi, I'm not able to find a workaround for this as I'm using poetry. There is not option like "--no-build-isolation" in poetry. Can anyone help me please? Thanks. |
@alejobs give this workaround a go: pypa/setuptools#4519 (comment)
|
So, does pip apply constraints to build environments? It’s easy for us to do that but I think it’s intentional that we don’t (at least right now). |
Force --no-build-isolation as suggested in astral-sh/uv#5551
Force --no-build-isolation as suggested in astral-sh/uv#5551
setuptools 72.0.0 is yanked |
For the future, you can also set |
As setuptools 72.0.0 has been yanked, I suppose we no longer need the workaround at the moment. I will close the issue in a few days for the visibility just in case, because some users might be still confused by the deprecation issue. Thank you all for your help. |
Thanks. Still wondering if we should apply constraints to build environments :) |
I would definitely say that having the ability to constrain what packages are used in an isolated build would be very useful and welcome. |
It is extremely important to be able to constrain build environments. Whether it's the same variable or not, but it's important to be able to do it! It's used all the time with PIP_CONSTRAINTS. |
Agreed. Somewhat undecided on whether it should be coupled to |
Will track here: #5561 |
Overview
I got the similar error
ModuleNotFoundError: No module named 'setuptools.command.test'
with the install command on GitHub Actions as the benchmarks workflow was failed.The failed benchmarks workflow
https://github.com/astral-sh/uv/actions/runs/10137169832/job/28027028298
The text was updated successfully, but these errors were encountered: