Skip to content
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

Vendored distutils incompatible with Python 3.5 #2357

Closed
sjoerdjob opened this issue Aug 31, 2020 · 5 comments
Closed

Vendored distutils incompatible with Python 3.5 #2357

sjoerdjob opened this issue Aug 31, 2020 · 5 comments

Comments

@sjoerdjob
Copy link

As part of setuptools 50.0, the vendored ("local") distutils implementation has been chosen over the stdlib version.

Looking at

cmd.extend(subprocess._optim_args_from_interpreter_flags())
we see that subprocess._optim_args_from_interpreter_flags() is called. However, this is not present on Python 3.5.

openstack-mirroring pushed a commit to openstack/project-config that referenced this issue Aug 31, 2020
setuptools==50 doesn't work with python older than python3.8. There are
a number of issues [0][1][2] the first of which we are tripping over. Be
conservative here and install older setuptools until these issues on
python3.5, 3.6, and 3.7 are sorted out.

[0] pypa/setuptools#2352
[1] https://github.com/pypa/setuptools/issues/2363
[2] pypa/setuptools#2357

Change-Id: I1ae7251c8a4c214544524871fdfe51e947b638f8
@jaraco
Copy link
Member

jaraco commented Aug 31, 2020

Indeed, running tox -e py35 on the pypa/distutils repo, it fails tests... so yeah, that's a problem.

@jaraco
Copy link
Member

jaraco commented Aug 31, 2020

pypa/distutils@cdcdda0405 fixes the NameError, but the tests still don't catch subprocess._optim_args_from_interpreter_flags :(

@jaraco
Copy link
Member

jaraco commented Sep 1, 2020

Hilariously, there's a comment in subprocess that says "This function is only used by multiprocessing and the test suite".

jaraco added a commit to pypa/distutils that referenced this issue Sep 1, 2020
jaraco added a commit to pypa/distutils that referenced this issue Sep 1, 2020
@jaraco
Copy link
Member

jaraco commented Sep 1, 2020

I've pushed a compatibility change for the reported issue. Can you test with this patched build in the environment that failed and report if there are any other incompatibilities?

@sjoerdjob
Copy link
Author

Thank you for the patched build. The fix works insofar that it no longer fails on due to the AttributeError. It instead fails in a way that I believe to be issue #2352

@jaraco jaraco closed this as completed in 4ea9dd8 Sep 1, 2020
clrpackages pushed a commit to clearlinux-pkgs/setuptools that referenced this issue Sep 3, 2020
…on 50.0.1

Jason R. Coombs (10):
      Create Github releases when releasing. Fixes #2328.
      Supply ModuleNotFoundError for Python 3.5.
      Restore compatibility with aix_support on Python 3.8 and earlier. Fixes pypa/setuptools#2358.
      Supply a copy of _optim_args_from_interpreter_flags for Python 3.5 compatibility. Ref pypa/setuptools#2357.
      Doctest modules for valid syntax, capturing TabError.
      Fix TabError
      Update changelog. Ref #2358.
      Bugfix is 'misc'. Ref #2361.
      Update changelog. Closes #2357.
      Bump version: 50.0.0 → 50.0.1

Victor Stinner (1):
      Add Python 3.10 support to _distutils_hack
clrpackages pushed a commit to clearlinux-pkgs/openstack-setuptools that referenced this issue Sep 3, 2020
…0 to version 50.0.1

Jason R. Coombs (10):
      Create Github releases when releasing. Fixes #2328.
      Supply ModuleNotFoundError for Python 3.5.
      Restore compatibility with aix_support on Python 3.8 and earlier. Fixes pypa/setuptools#2358.
      Supply a copy of _optim_args_from_interpreter_flags for Python 3.5 compatibility. Ref pypa/setuptools#2357.
      Doctest modules for valid syntax, capturing TabError.
      Fix TabError
      Update changelog. Ref #2358.
      Bugfix is 'misc'. Ref #2361.
      Update changelog. Closes #2357.
      Bump version: 50.0.0 → 50.0.1

Victor Stinner (1):
      Add Python 3.10 support to _distutils_hack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants