-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] Many packages are no longer installable after test command is removed #4519
Comments
I got a similar error today. |
we are also getting similar error. |
i got a similiar error too |
I am also blocked because of this error |
after an hour of googling, looks like I found the right bug :) Latest Logbook (1.7.0) seems to have fixed this but dbt-core still points to the older broken module. |
Facing same error here.
|
I was also faced this issue with ❯ docker run --rm -it 'python:3.9' /bin/bash
root@81f338564edc:/# python -m pip install --upgrade pip
Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (23.0.1)
Collecting pip
Downloading pip-24.2-py3-none-any.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 5.0 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 23.0.1
Uninstalling pip-23.0.1:
Successfully uninstalled pip-23.0.1
Successfully installed pip-24.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@81f338564edc:/# pip3.9 install cssbeautifier
Collecting cssbeautifier
Downloading cssbeautifier-1.15.1.tar.gz (25 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 "/usr/local/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-sd2vprw8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "/tmp/pip-build-env-sd2vprw8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-sd2vprw8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-sd2vprw8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 9, in <module>
ModuleNotFoundError: No module named 'setuptools.command.test'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
root@81f338564edc:/# pip3.9 install --no-build-isolation cssbeautifier
Collecting cssbeautifier
Using cached cssbeautifier-1.15.1.tar.gz (25 kB)
Preparing metadata (pyproject.toml) ... done
Collecting jsbeautifier (from cssbeautifier)
Downloading jsbeautifier-1.15.1.tar.gz (75 kB)
Preparing metadata (pyproject.toml) ... done
Collecting six>=1.13.0 (from cssbeautifier)
Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting editorconfig>=0.12.2 (from cssbeautifier)
Downloading EditorConfig-0.12.4.tar.gz (13 kB)
Preparing metadata (pyproject.toml) ... done
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: cssbeautifier, editorconfig, jsbeautifier
Building wheel for cssbeautifier (pyproject.toml) ... done
Created wheel for cssbeautifier: filename=cssbeautifier-1.15.1-py3-none-any.whl size=30536 sha256=fe16be1043cad7c149be1d60d9320b61f2c64ba672681fab279b2a88a71d9ff4
Stored in directory: /root/.cache/pip/wheels/7f/2d/19/5d9d82d3c7280e2c68a07b906c458f0a5506cb2b812d330383
Building wheel for editorconfig (pyproject.toml) ... done
Created wheel for editorconfig: filename=EditorConfig-0.12.4-py3-none-any.whl size=16377 sha256=9acd52f9cb94f6fabd33cc641d4acb07a4714ada4678388b08e45722eabd5607
Stored in directory: /root/.cache/pip/wheels/0b/7b/d7/1979a68ec6ce660c89044dc57d175e32f1943bcb8937e43f6e
Building wheel for jsbeautifier (pyproject.toml) ... done
Created wheel for jsbeautifier: filename=jsbeautifier-1.15.1-py3-none-any.whl size=94721 sha256=c9fefe5c1d947c492e3b8ea0173783df9821f8ca8a46637a8d4a645b9070ae18
Stored in directory: /root/.cache/pip/wheels/1f/82/d9/63c09b95f4576d2822b61d073de8f4e3b6fd386112dcb9835d
Successfully built cssbeautifier editorconfig jsbeautifier
Installing collected packages: editorconfig, six, jsbeautifier, cssbeautifier
Successfully installed cssbeautifier-1.15.1 editorconfig-0.12.4 jsbeautifier-1.15.1 six-1.16.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. |
Here's how to work around this breakage: Option 1:
Then set Option 2: Use Option 3: Ask the maintainers of each package that is broken like this to adapt to new setuptools and wait for them to make a release In general, I find it unfortunate that build isolation intends to increase reproducibility, but the tools given to users make this really tricky in practice. I think ^ is pretty hard for most Python users I know to come up with (and lacks e.g. the ability to hash pin). Probably wrong place to rant though, setuptools maintainers probably feel the pain of this more than anyone else! :-) Edit: if setuptools does decide to revert something here, I have a suggestion in #4520 for how the underlying change could be rolled out more gradually |
Hi, is option 1 compatible with
I am currently running this on Dockerfile |
This is the related PR: #4458 |
Same issue. |
Would it be possible to mark this version as yanked in pypi and follow a more gradual approach with deprecation warnings on install as mentioned in #4520 ? Especially installs with poetry seem to have issues and currently I couldn't find a solution to overcome it. Did anybody find a solution for following or similar combination?
EDIT: Found a solution thanks to help of @ilpianista and @Hannes0730 , see my post below: #4519 (comment) (Of course we want to upgrade, but we're still using sqlalchemy==1.4.49 which requires a major upgrade to 2.0 to support PEP 517). |
As documented here pypa/setuptools#4519 setuptools has released a breaking change that removes a functionality used by some our dependencies breaking the install process. In our case is the VCR package that has been already notified kevin1024/vcrpy#858 [run nft py tests]
Workaround pypa/setuptools#4519 by constraining `setuptools<72.0.0` when installing dependencies for Django tests.
Revert getsentry#3371, which was needed to work around pypa/setuptools#4519 and allow our Django tests to run on Python 3.12. pypa/setuptools#4519 has been resolved upstream, so the workaround should no longer be needed.
For more info, see the issue in setuptools pypa/setuptools#4519 This commit also removes the obsolete `--disable-pip-version-check` option.
Has been deprecated for 5+ years and has been removed in recent setuptools versions. See pypa/setuptools#4519
See pypa/setuptools#4519 * Remove tests_require and add a test extra * Add extra for ecos since it will not be installed by default https://www.cvxpy.org/updates/index.html#ecos-deprecation
…_rpm or test using setuptools. The setuptools 69.3.0 started to change dashes to underscores, leading to + /usr/lib/rpm/rpmuncompress -x -v /src/build/bdist.linux-x86_64/rpm/SOURCES/python-libssh-0.0.1.tar.gz error: File /src/build/bdist.linux-x86_64/rpm/SOURCES/python-libssh-0.0.1.tar.gz: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.deAYuh (%prep) pypa/setuptools#3593 The setuptools 72.0.2 removed setup.py test command, leading to /usr/lib/python3.13/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'test' pypa/setuptools#4519
For those landing on this issue, please see:
(thank you @delfick for summarizing this)
Quoted from #4519 (comment)
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
python -m pip install --upgrade pip
pip3.9 install doubles==1.4.0
Output
The text was updated successfully, but these errors were encountered: