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

Master is red on PyPy 3.5 with setuptools 50.0 #8824

Closed
uranusjr opened this issue Aug 31, 2020 · 9 comments
Closed

Master is red on PyPy 3.5 with setuptools 50.0 #8824

uranusjr opened this issue Aug 31, 2020 · 9 comments
Labels
type: maintenance Related to Development and Maintenance Processes

Comments

@uranusjr
Copy link
Member

Environment

  • pip version: master
  • Python version: PyPy 3.5
  • OS: Linux? Travis is failing, but I doubt this is OS-dependent.

Red job: https://travis-ci.com/github/pypa/pip/jobs/379292143
Green job: https://travis-ci.com/github/pypa/pip/jobs/379138473

Both are run against 0b18e21, the only different (I believe) is the setuptools version they fetch.

Description

After setuptools 50.0, the test environment fails to populate on PyPy. This is the relevent Tox log:

  Attempting uninstall: setuptools
    Found existing installation: setuptools 28.8.0
    Uninstalling setuptools-28.8.0:
      Successfully uninstalled setuptools-28.8.0
    Running setup.py install for cffi: started
    Running setup.py install for cffi: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /home/travis/build/pypa/pip/.tox/pypy/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4lh__icz/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/build/pypa/pip/.tox/pypy/include/site/python3.5/cffi
         cwd: /tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/
    Complete output (58 lines):

    'import site' failed
    /home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/version.py:1: UserWarning: Module _cffi_backend was already imported from None, but /tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb is being added to sys.path
      import pkg_resources
    Traceback (most recent call last):
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 160, in _subst_vars
        return s.format(**local_vars)
    KeyError: 'userbase'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 163, in _subst_vars
        return s.format(**os.environ)
    KeyError: 'userbase'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py", line 263, in <module>
        'License :: OSI Approved :: MIT License',
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/core.py", line 134, in setup
        ok = dist.parse_command_line()
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/dist.py", line 484, in parse_command_line
        args = self._parse_command_opts(parser, args)
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/dist.py", line 903, in _parse_command_opts
        nargs = _Distribution._parse_command_opts(self, parser, args)
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/dist.py", line 540, in _parse_command_opts
        cmd_class = self.get_command_class(command)
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/dist.py", line 742, in get_command_class
        self.cmdclass[command] = cmdclass = ep.load()
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/pkg_resources/__init__.py", line 2447, in load
        return self.resolve()
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/pkg_resources/__init__.py", line 2453, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/command/install.py", line 6, in <module>
        import distutils.command.install as orig
      File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/command/install.py", line 18, in <module>
        from site import USER_BASE
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 574, in <module>
        main()
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 560, in main
        known_paths = addusersitepackages(known_paths)
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 283, in addusersitepackages
        user_site = getusersitepackages()
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 272, in getusersitepackages
        USER_SITE = get_path('purelib', '%s_user' % os.name)
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 514, in get_path
        return get_paths(scheme, vars, expand)[name]
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 504, in get_paths
        return _expand_vars(scheme, vars)
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 184, in _expand_vars
        res[key] = os.path.normpath(_subst_vars(value, vars))
      File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 165, in _subst_vars
        raise AttributeError('{%s}' % var)
    AttributeError: {'userbase'}
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/travis/build/pypa/pip/.tox/pypy/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4lh__icz/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/build/pypa/pip/.tox/pypy/include/site/python3.5/cffi Check the logs for full command output.

Traceback (most recent call last):
  File "tools/tox_pip.py", line 31, in <module>
    pip(sys.argv[1:])
  File "tools/tox_pip.py", line 27, in pip
    subprocess.check_call([sys.executable, '-m', 'pip'] + args)
  File "/opt/python/pypy3.5-7.0.0/lib-python/3/subprocess.py", line 271, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/travis/build/pypa/pip/.tox/pypy/bin/python', '-m', 'pip', 'install', '-r/home/travis/build/pypa/pip/tools/requirements/tests.txt']' returned non-zero exit status 1

Expected behavior
The test environment should be populated correctly.

@pradyunsg pradyunsg added the type: maintenance Related to Development and Maintenance Processes label Aug 31, 2020
@pradyunsg
Copy link
Member

pradyunsg commented Aug 31, 2020

Hmm... setuptools' issue tracker doesn't look great.

Screenshot 2020-08-31 at 4 29 46 PM

@eamanu
Copy link
Contributor

eamanu commented Sep 7, 2020

Why don't force install setuptools < 50 until it is fixed?

@pradyunsg
Copy link
Member

We're back to green after setuptools 50.1.0 release. :)

https://setuptools.readthedocs.io/en/latest/history.html#v50-1-0

@uranusjr
Copy link
Member Author

uranusjr commented Sep 7, 2020

I am not entirely sure it is best to close and shove this under the rug. At least one of the breakages induced by setuptools 50.0 is already confirmed as a pip bug, and there very well may be more. pip needs a detailed (if not complete) accessment to its setuptools compatibiliy and fix the compatibility issues so the world does not break again when the distutils switch eventually happens.

@pradyunsg
Copy link
Member

Agreed -- I don't mean to shove this under the rug. I was filing an issue for "preparedness for $thing" (while struggling to figure out a good name for $thing) and a diplomatically saying we need to be prepared for this + the standard library removal. :)

@McSinyx
Copy link
Contributor

McSinyx commented Sep 7, 2020

At least one of the breakages induced by setuptools 50.0 is already confirmed as a pip bug

May I have the pointer to this? Admittedly the number of tickets opened due to setuptools 50.0.0 scared me and I muted most of the relevant discussion 😞

@uranusjr
Copy link
Member Author

uranusjr commented Sep 7, 2020

I believe it’s a variant of #8214

@pradyunsg
Copy link
Member

You said it better than I could phrase it @uranusjr. Plus, I can hide behind "I didn't say that" too. :)

Filed #8851 for the follow up discussion.

@McSinyx
Copy link
Contributor

McSinyx commented Sep 8, 2020

Thanks for the pointer. I'm not sure what I can do about it, but I was curious.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

No branches or pull requests

4 participants