-
-
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] new release (57) breaks piptools pytest #2687
Comments
# setup.py
from setuptools import setup
setup(
name="foo",
version=0.1,
install_requires=[
"futures<3.1,>=3.0.3",
],
) $ pip install -e . --no-cache --force-reinstall |
Ah, finally got it. Since File "/usr/lib/setuptools/_vendor/more_itertools/more.py", line 5, in <module>
from concurrent.futures import ThreadPoolExecutor @jaraco Looks like it's more like a bug on https://github.com/agronholm/pythonfutures side. It probalby should use |
Thanks for the investigation. Sounds like there's not much for Setuptools to do here. Feel free to comment if I'm mistaken and we can re-open. |
As pointed out on my side, |
It sounds as if something in the build chain is not honoring the python-requires then. |
There are earlier releases that don't have this declaration, maybe that's why. @nicoa did you check which version was installed? Maybe I should yank all those obsolete releases. |
It tries to install |
So what exactly has this dependency? pip-tools doesn't, setuptools doesn't, more-itertools doesn't. |
I made a post-release that retroactively adds |
I still get the reported issue with Python 3.9 and a package that specifies I couldn't figure out how The only way to fix this for me was to downgrade |
What's the simplest way to repro this? |
Try |
Ok so...if I was to yank 3.1.0, what would happen? The installation would fail because there is no matching release. |
What also greatly confuses me is that 3rd party packages aren't supposed to override stdlib imports. Why is that happening here? |
From what I could tell that seems like the main issue - if I'm not mistaken, specifying EDIT: Turns out that the current working directory takes precedence even over the standard library. So if I create a module called What seems to happen here is that |
I can more readily replicate the issue by simply attempting to install
|
I note that employing
Here's what I think is happening:
Next, I'll attempt to replicate the failure without pip by simulating what pip is doing. |
Indeed, I can replicate the issue without pip thus:
|
So if |
And the only reason this issue was not an issue before was because nothing in Setuptools attempted to import |
Yep exactly, it's the perfect storm of Only installing the futures package itself could lead to this issue, as it's the only one containing an actual |
First things first: please let me know if there is any information missing - It's kind of hard to me to trace this down to the actual bug or to an minimum example of what is failing unfortunately.
setuptools version
setuptools==57.0.0
Python version
3.6,3.7,3.8,3.9
OS
Ubuntu, Windows, MacOS
Additional environment information
Hey, please see this issue where it was discovered: jazzband/pip-tools#1403
First, it was wrongly attributed to be caused by pip version deprecation and feature flag, but it seems to be due to new setuptools (details in description). So currently all CI runners are broken there in that project.
Description
Unfortunately, I'm not exactly aware of what happens behind the scenes on piptools testing suite. I'd like to share the code I could reproduce locally so far by running some of the tests manually in the fields below.
Expected behavior
There shouldn't be anything failing because it worked on the old version before.
How to Reproduce
tests/test_cli_compile.py
and copy the imports from above and the code from the functiontest_realistic_complex_sub_dependencies
, done in the following in detail:runner = CliRunner(mix_stderr=False)
which fails.
Output
expected
In [39]: out.stderr Out[39]: '#\n# This file is autogenerated by pip-compile\n# To update, run:\n#\n# pip-compile --find-links=wheels\n#\n--find-links wheels\n\ncolorama==0.3.9\n # via fake-with-deps\ncornice==1.0.0\n # via fake-with-deps\nenum34==1.1.6\n # via fake-with-deps\nfake-with-deps==0.1\n # via -r requirements.in\nfutures==3.0.5\n # via fake-with-deps\ngreenlet==1.1.0\n # via sqlalchemy\nipaddress==1.0.23\n # via fake-with-deps\njsonschema==2.6.0\n # via fake-with-deps\npastedeploy==2.1.1\n # via pyramid\npyramid==1.5.8\n # via\n # cornice\n # fake-with-deps\npython-dateutil==2.4.2\n # via fake-with-deps\npython-memcached==1.59\n # via fake-with-deps\npyzmq==14.7.0\n # via fake-with-deps\nrepoze.lru==0.7\n # via pyramid\nsimplejson==3.17.2\n # via\n # cornice\n # fake-with-deps\nsix==1.8.0\n # via\n # fake-with-deps\n # python-dateutil\n # python-memcached\nsqlalchemy==1.4.15\n # via fake-with-deps\ntranslationstring==1.4\n # via pyramid\nvenusian==3.0.0\n # via pyramid\nwebob==1.8.7\n # via pyramid\nxmltodict==0.11.0\n # via fake-with-deps\nzope.deprecation==4.4.0\n # via pyramid\nzope.interface==5.4.0\n # via pyramid\n\n# The following packages are considered to be unsafe in a requirements file:\n# setuptools\nDry-run, so nothing updated.\n'
actual (failing) output
Code of Conduct
The text was updated successfully, but these errors were encountered: