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

pip --use-deprecated legacy-resolver download ... fails at b88addeaf5fde848733d7ef631caa522eb1cfa53 #12138

Closed
1 task done
jsirois opened this issue Jul 11, 2023 · 2 comments · Fixed by #12140
Closed
1 task done
Labels
type: bug A confirmed bug or unintended behavior

Comments

@jsirois
Copy link
Contributor

jsirois commented Jul 11, 2023

Description

I bisected to b88adde (#11945) using:

PYTHONPATH=src python3.12 -mpip --use-deprecated legacy-resolver download setuptools==68.0.0

The error is:

$ PYTHONPATH=src python3.12 -mpip --use-deprecated legacy-resolver download setuptools==68.0.0
Collecting setuptools==68.0.0
  Obtaining dependency information for setuptools==68.0.0 from https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl.metadata
  Using cached setuptools-68.0.0-py3-none-any.whl.metadata (6.4 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/commands/download.py", line 133, in run
    requirement_set.warn_legacy_versions_and_specifiers()
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/req/req_set.py", line 89, in warn_legacy_versions_and_specifiers
    version = req.get_dist().version
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/req/req_install.py", line 598, in get_dist
    raise AssertionError(
AssertionError: InstallRequirement setuptools==68.0.0 from https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl has no metadata directory and no wheel: can't make a distribution.

Expected behavior

No backtrace / blowup or else removal of --use-deprecated support for legacy-resolver as per: https://pip.pypa.io/en/latest/user_guide/#deprecation-timeline

pip version

unreleased: main @ b88adde

Python version

3.12 (but same with others)

OS

Linux (Ubuntu 22.04)

How to Reproduce

See above, but in a pypa/pip clone:

PYTHONPATH=src python -mpip --use-deprecated legacy-resolver download setuptools==68.0.0

Output

$ PYTHONPATH=src python3.12 -mpip --use-deprecated legacy-resolver download setuptools==68.0.0
Collecting setuptools==68.0.0
  Obtaining dependency information for setuptools==68.0.0 from https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl.metadata
  Using cached setuptools-68.0.0-py3-none-any.whl.metadata (6.4 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/commands/download.py", line 133, in run
    requirement_set.warn_legacy_versions_and_specifiers()
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/req/req_set.py", line 89, in warn_legacy_versions_and_specifiers
    version = req.get_dist().version
  File "/home/jsirois/dev/pypa/pip/src/pip/_internal/req/req_install.py", line 598, in get_dist
    raise AssertionError(
AssertionError: InstallRequirement setuptools==68.0.0 from https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl has no metadata directory and no wheel: can't make a distribution.

Code of Conduct

@jsirois jsirois added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 11, 2023
jsirois added a commit to jsirois/pex that referenced this issue Jul 11, 2023
A recent Pip commit has broken
`pip --use-deprecated legacy-resolver download ...` which is our
backwards-compatible default use case. Whether or not Pip decides to
fix, the legacy resolver will be yanked at some point and it seems
reasonable to just require any Pex user on Python 3.12 and thus Pip 23.2
to only use the Pip 2020 resolver.

See: pypa/pip#12138
jsirois added a commit to jsirois/pex that referenced this issue Jul 11, 2023
A recent Pip commit has broken
`pip --use-deprecated legacy-resolver download ...` which is our
backwards-compatible default use case. Whether or not Pip decides to
fix, the legacy resolver will be yanked at some point and it seems
reasonable to just require any Pex user on Python 3.12 and thus Pip 23.2
to only use the Pip 2020 resolver.

See: pypa/pip#12138
@uranusjr
Copy link
Member

I have another finding that pip download doesn’t seem to even download, but I guess that’s a different problem. The particular error is being resolved in #12140.

@uranusjr uranusjr removed the S: needs triage Issues/PRs that need to be triaged label Jul 11, 2023
jsirois added a commit to pex-tool/pex that referenced this issue Jul 11, 2023
A recent Pip commit has broken
`pip --use-deprecated legacy-resolver download ...` which is our
backwards-compatible default use case. Whether or not Pip decides to
fix, the legacy resolver will be yanked at some point and it seems
reasonable to just require any Pex user on Python 3.12 and thus Pip 23.2
to only use the Pip 2020 resolver.

See: pypa/pip#12138
@jsirois
Copy link
Contributor Author

jsirois commented Jul 11, 2023

Thanks for the fix @uranusjr.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants