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

use_2to3 is invalid (setoptconf) #2782

Closed
1 task done
mithunsl opened this issue Sep 9, 2021 · 2 comments
Closed
1 task done

use_2to3 is invalid (setoptconf) #2782

mithunsl opened this issue Sep 9, 2021 · 2 comments
Labels

Comments

@mithunsl
Copy link

mithunsl commented Sep 9, 2021

setuptools version

setuptools==58.0.2

Python version

3.6.13

OS

Ubuntu 20.04

Additional environment information

No response

Description

pip install setoptconf(https://pypi.org/project/setoptconf/) using setuptools 58.0.2 and above.

Expected behavior

pip install setoptconf(or any other packages) should succeed.

How to Reproduce

With setuptools 58.0.2, pip installing setoptconf(this a dependency from prospector) fails.

Falling back to 58.0.1, Install succeeds.

I understand that 2770 specifically makes usage of use_2to3 invalid.

However, this seems to be breaking installation of widely used python packages.

Output

$ pip install setuptools==58.0.2
Collecting setuptools==58.0.2
  Using cached setuptools-58.0.2-py3-none-any.whl (816 kB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 58.0.3
    Uninstalling setuptools-58.0.3:
      Successfully uninstalled setuptools-58.0.3
Successfully installed setuptools-58.0.2

$ pip install setoptconf
Looking in indexes: https://pypi.org/simple
Collecting setoptconf
  Using cached setoptconf-0.2.0.tar.gz (13 kB)
    ERROR: Command errored out with exit status 1:
     command: /src/.venv/bin/python3.6m -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8xus1jkn/setoptconf_d71798b19c724112834cd40ba692ea0d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8xus1jkn/setoptconf_d71798b19c724112834cd40ba692ea0d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-sf2rlgyz
         cwd: /tmp/pip-install-8xus1jkn/setoptconf_d71798b19c724112834cd40ba692ea0d/
    Complete output (1 lines):
    error in setoptconf setup command: use_2to3 is invalid.
    ----------------------------------------
    
    $ pip install setuptools==58.0.1
Looking in indexes: https://pypi.org/simple
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 58.0.2
    Uninstalling setuptools-58.0.2:
      Successfully uninstalled setuptools-58.0.2
Successfully installed setuptools-58.0.1

$ pip install setoptconf
Looking in indexes: https://pypi.org/simple
Collecting setoptconf
  Using cached setoptconf-0.2.0.tar.gz (13 kB)
Building wheels for collected packages: setoptconf
  Building wheel for setoptconf (setup.py) ... done
  Created wheel for setoptconf: filename=setoptconf-0.2.0-py3-none-any.whl size=13572 sha256=14decd564e54c20be9794ce6e669e1d3d94629f41bf3cce3776a8a56ed0a9d2a
  Stored in directory: /home/####/.cache/pip/wheels/ce/f2/8b/f7a4f5fb538575ddfae17603b9055a3ba74b351598b7d7a68a
Successfully built setoptconf
Installing collected packages: setoptconf
Successfully installed setoptconf-0.2.0

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@mithunsl mithunsl added bug Needs Triage Issues that need to be evaluated for severity and status. labels Sep 9, 2021
@mithunsl mithunsl changed the title [BUG] pip install setoptconf==0.20.0 fails starting with setuptools==58.0.2 [BUG] pip install setoptconf==0.2.0 fails starting with setuptools==58.0.2 Sep 9, 2021
@mithunsl mithunsl changed the title [BUG] pip install setoptconf==0.2.0 fails starting with setuptools==58.0.2 [BUG] pip install setoptconf==0.2.0 fails starting with setuptools==58.0.2 and later Sep 9, 2021
@jimmyhli
Copy link

jimmyhli commented Sep 10, 2021

use_2to3 has been removed as of 58.0.0 of setuptools, the reason you could install it was setuptools==58.0.0 didn't properly fail the installation process, so while it appeared to have been successful, it likely wasn't.

For this particular package, relevant bug was fixed in 0.3.0, can you try setoptconf==0.3.0 instead?

@jaraco jaraco changed the title [BUG] pip install setoptconf==0.2.0 fails starting with setuptools==58.0.2 and later use_2to3 is invalid (setoptconf) Sep 12, 2021
@jaraco jaraco added invalid and removed bug Needs Triage Issues that need to be evaluated for severity and status. labels Sep 12, 2021
@jaraco jaraco closed this as completed Sep 12, 2021
@mithunsl
Copy link
Author

Yes. I have moved to use setoptconf==0.3.0. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants