-
-
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] error in XXXX setup command: use_2to3 is invalid when false. #2775
Comments
Thanks for raising the issue @miguelfito Also good to note that this bug is causing errors in downstream dependancies like FlaskOpenID |
May i suggest to revert #2770 and push a new patch level release? |
There was no deprecation warning for the change in #2770 for packages that disable the It doesn't make sense to break installation of packages which disable the feature, without any notice. Even if there was a deprecation warning, disabling the feature probably shouldn't break installation. |
It sounds like it was assumed that since setuptools no longer supports Python 2 (it was dropped around 21 months ago — https://setuptools.rtfd.io/en/latest/history.html#v45-0-0), nobody would hit this anyway 🤷♂️. |
FWIW I see why this could've been expected to be dropped in a major version. So I'll recommend @jaraco to re-release as v59 and yank v58.0.2 on PyPI. To all the others, if you legitimately think that this should be resurrected, it'd be useful if somebody could come up with a failing regression test that could be merged as XFAIL per https://pganssle-talks.github.io/xfail-lightning/. I don't have a strong case for having this supported in a post Py2 EOL world, though, and would understand if Jason wouldn't want to recover this, especially since he is the only active maintainer in the whole world (without exaggeration). |
Seems like there are some ancient projects down low in common projects' dependency Jenga that actually do use it (another Ansible team just tripped over Celery's indirect use of |
Try setting an env var |
@webknjaz While I agree yanking 58.0.2 makes sense, I don't think a re-release as 59 does, given the lack of a deprecation warning in some cases. |
@HaoYuanLi yes, that was my thought. Specifically that failing for a package that wanted to use 2to3 was better than installing it "successfully" without applying 2to3, as 58.0.0 and 58.0.1 did. Edit: so if I've done it right, I think that #2777 results in the behaviour I had in mind. |
Also another thought regarding the initial issue report, and how it relates to my intent when I raised #2769: $ python --version && pip install setuptools==58.0.1 && pip install mailer==0.8.1 && python -c 'import mailer'
Python 3.9.6
Collecting setuptools==58.0.1
Using cached setuptools-58.0.1-py3-none-any.whl (816 kB)
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 56.0.0
Uninstalling setuptools-56.0.0:
Successfully uninstalled setuptools-56.0.0
Successfully installed setuptools-58.0.1
Collecting mailer==0.8.1
Using cached mailer-0.8.1.zip (6.5 kB)
Using legacy 'setup.py install' for mailer, since package 'wheel' is not installed.
Installing collected packages: mailer
Running setup.py install for mailer ... done
Successfully installed mailer-0.8.1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/example/venv/lib/python3.9/site-packages/mailer.py", line 36, in <module>
import Queue
ModuleNotFoundError: No module named 'Queue' ( So I think what has happened here is exactly what I'd hoped when I raised #2769: you found a bug at |
The installation of the coverage package fails (a dependency of pytest-cov), due to this breaking change: pypa/setuptools#2775
I honestly did not expect that anyone would have specified
#2770 is a tweak on the original incompatibility introduced on the 58 release. That's where the main incompatibility was introduced. v58.0.2 simply fails faster and in closer proximity to the cause. I'll restore compatibility for
I doubt making a backward-incompatible release will have any benefit. v58.0.3 will restore support for
The main case to be made is for old, unmaintained code that's still in Python 2 syntax but installed on Python 3. I don't want to support this use case any longer. I did expect there would be some disruption from this change and my hope was that it would be small (a few fringe packages), and thus believe a deprecation period to be possibly unnecessary. I'm even offering to help revive/maintain some of these packages. |
Fixed in #2777. |
On the other hand, how will this be handled in future releases of setuptools? For packages that have |
FTR this manifests itself as #2776. |
setuptools version
setuptools==58.0.2
Python version
Python 3.6.9, Python 3.9.2
OS
Ubuntu 18.04.5 LTS, Debian 11
Additional environment information
This happens installing any Python2 package when trying to use
use_2to3
on setuptool executionDescription
Error installing a package that requires to use
use_2to3
on its installationExpected behavior
The package should be installed as previous versions do (like
setuptools==58.0.1
)How to Reproduce
virtualenv
and activate it.use_2to3
on its installation.Output
virtualenv
like:Code of Conduct
The text was updated successfully, but these errors were encountered: