← All tasks
pythonpypa/setuptools #4519Not a task: not reproduced

[BUG] Many packages are no longer installable after test command is removed

envgap__pypa__setuptools-4519

Original GitHub issue ↗Opened 2024-07-29

01 / FAILURE SIGNATURE

As reported upstream

> * For people using uv, there seems to be a bug where `UV_CONSTRAINT` doesn't affect the version of setuptools used in build isolation (see [ModuleNotFoundError: No module named 'setuptools.command.test' astral-sh/uv#5551](https://github.com/astral-sh/uv/issues/5551)) and in that case the solution is either `--no-build-isolation` (which should be considered a temporary solution) or getting packages to not use setuptools.command.test or using forks of those packages that comment out the use of setuptools.command.test (until setuptools releases a fix/revert)
Not a benchmark task.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
requirements.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

pypa/setuptools #4519 · read the original issue
For those landing on this issue, please see: 

(thank you @delfick for summarizing this) 

> * This functionality has been deprecated for 5 years, there is a separate issue for discussing if there would have been a better way of removing the functionality [[FR] More gradual breakage of setuptools.command.test #4520](https://github.com/pypa/setuptools/issues/4520)

> * For people using pip (or tools using pip, like poetry), `PIP_CONSTRAINT` set to a file with `setuptools<72.0` should work

> * For people using uv, there seems to be a bug where `UV_CONSTRAINT` doesn't affect the version of setuptools used in build isolation (see [ModuleNotFoundError: No module named 'setuptools.command.test' astral-sh/uv#5551](https://github.com/astral-sh/uv/issues/5551)) and in that case the solution is either `--no-build-isolation` (which should be considered a temporary solution) or getting packages to not use setuptools.command.test or using forks of those packages that comment out the use of setuptools.command.test (until setuptools releases a fix/revert)

> * To press subscribe to the ticket and/or thumbs up the top post instead of adding "same" comments



Quoted from https://github.com/pypa/setuptools/issues/4519#issuecomment-2255389347



---



### setuptools version



setuptools==72.0.0



### Python version



Python 3.9



### OS



Linux



### Additional environment information



_No response_



### Description



The breakage change released on 72.0 breaks the default build isolation build of many packages since many of these packages do not pin on a particular setuptools version.

There is also no way to pin to an older setuptools version as pip doesn't offer a way to do this. Installing setuptools==71 first, then installing the package doesn't work as the default build isolation resolves the dependencies without considering the lock file nor currently installed packages.



Based on  these packages need to be patched with `setup_requires` before install, which is nearly impossible since we'd need to patch all packages.



### Expected behavior



Install is successful.



### How to Reproduce



1. Create a virtual environment

2. Upgrade to latest pip 24.2: `python -m pip install --upgrade pip`

3. `pip3.9 install doubles==1.4.0`



### Output



```console

me@my ~/repro-pip-fail

 % pip3.9 install doubles==1.4.0                    

Looking in indexes: http://…

Collecting doubles==1.4.0

  Using cached http://…/doubles-1.4.0.tar.gz (16 kB)

  Installing build dependencies ... done

  Getting requirements to build wheel ... error

  error: subprocess-exited-with-error

  

  × Getting requirements to build wheel did not run successfully.

  │ exit code: 1

  ╰─> [17 lines of output]

      Traceback (most recent call last):

        File "/home/user/repro-pip-fail/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>

          main()

        File "/home/user/repro-pip-fail/venv/lib/
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

security
Label rules and the text that matched
[
  {
    "category": "security",
    "rule": "issue.security_keyword",
    "source": "issue_title",
    "excerpt": "[BUG] Many packages are no longer installable after test command is removed"
  }
]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy already_works is install-only; proposed control still requires runtime verification.