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

[BUG] Install fails with use_2to3 is invalid error #3898

Closed
mattclay opened this issue Apr 20, 2023 · 7 comments · Fixed by #3900
Closed

[BUG] Install fails with use_2to3 is invalid error #3898

mattclay opened this issue Apr 20, 2023 · 7 comments · Fixed by #3900
Labels
bug help wanted Needs Investigation Issues which are likely in scope but need investigation to figure out the cause

Comments

@mattclay
Copy link

mattclay commented Apr 20, 2023

setuptools version

67.7.0

Python version

3.8

OS

Ubuntu 22.04.2 LTS

Additional environment information

Use of pip 23.1 is required for the reproducer given, since it relies on --no-binary attempting to build a wheel.
Additionally, wheel should not be installed for the reproducer to work.

The changes in #3849 seem related.

Description

Installation of coverage version 4.5.4 fails with setuptools version 67.7.0, but works with 67.6.1.

As a work-around, I can use the previous version of setuptools:

$ cat constraints.txt
setuptools==67.6.1
$ PIP_CONSTRAINT=./constraints.txt pip install coverage==4.5.4 --no-binary :all: --no-cache
Collecting coverage==4.5.4
  Downloading coverage-4.5.4.tar.gz (385 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 385.2/385.2 kB 1.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: coverage
  Building wheel for coverage (pyproject.toml) ... done
  Created wheel for coverage: filename=coverage-4.5.4-cp38-cp38-linux_x86_64.whl size=208278 sha256=73953647437bb81efefbaae00f779c00e8051e83d2ec0dba760e465e1793cc91
  Stored in directory: /tmp/pip-ephem-wheel-cache-pnyp3zi8/wheels/e7/0e/3f/4d16d7576f1070cf1a0028b1664aff2cc8e84c9c0e2b8f3207
Successfully built coverage
Installing collected packages: coverage
Successfully installed coverage-4.5.4

Expected behavior

$ pip install coverage==4.5.4 --no-binary :all: --no-cache
Collecting coverage==4.5.4
  Downloading coverage-4.5.4.tar.gz (385 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 385.2/385.2 kB 1.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: coverage
  Building wheel for coverage (pyproject.toml) ... done
  Created wheel for coverage: filename=coverage-4.5.4-cp38-cp38-linux_x86_64.whl size=208278 sha256=73953647437bb81efefbaae00f779c00e8051e83d2ec0dba760e465e1793cc91
  Stored in directory: /tmp/pip-ephem-wheel-cache-pnyp3zi8/wheels/e7/0e/3f/4d16d7576f1070cf1a0028b1664aff2cc8e84c9c0e2b8f3207
Successfully built coverage
Installing collected packages: coverage
Successfully installed coverage-4.5.4

How to Reproduce

pip install coverage==4.5.4 --no-binary :all: --no-cache

Output

$ pip install coverage==4.5.4 --no-binary :all: --no-cache
Collecting coverage==4.5.4
  Downloading coverage-4.5.4.tar.gz (385 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 385.2/385.2 kB 1.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      /tmp/pip-build-env-6bs8y2ax/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      /tmp/pip-build-env-6bs8y2ax/overlay/lib/python3.8/site-packages/setuptools/dist.py:954: DistDeprecationWarning: use_2to3 is ignored.
        ep.load()(self, ep.name, value)
      error in coverage setup command: use_2to3 is invalid.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
@mattclay mattclay added bug Needs Triage Issues that need to be evaluated for severity and status. labels Apr 20, 2023
@webknjaz webknjaz added help wanted Needs Investigation Issues which are likely in scope but need investigation to figure out the cause and removed Needs Triage Issues that need to be evaluated for severity and status. labels Apr 20, 2023
@mattclay
Copy link
Author

I updated the issue summary to mention using pip 23.1, since the reproducer relies on the new --no-binary behavior.

@mattclay
Copy link
Author

Also, wheel should not be installed for the reproducer to work.

@webknjaz
Copy link
Member

Also, wheel should not be installed for the reproducer to work.

I don't think its presence matters if PEP 517 is used.
Though, if it's not used, we're probably hitting a direct setup.py install invocation...

@JamMarHer
Copy link
Contributor

Related #3899

@abravalheri
Copy link
Contributor

Thank you very much.

@ashishra0
Copy link

@mattclay What is the fix here? 😅

@mattclay
Copy link
Author

@ashishra0 This issue was fixed in #3900 and was included in setuptools v67.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted Needs Investigation Issues which are likely in scope but need investigation to figure out the cause
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants