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 debug causes AttributeError in Python 3.13 #12590

Closed
1 task done
eggplants opened this issue Mar 23, 2024 · 0 comments
Closed
1 task done

pip debug causes AttributeError in Python 3.13 #12590

eggplants opened this issue Mar 23, 2024 · 0 comments
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior

Comments

@eggplants
Copy link

eggplants commented Mar 23, 2024

Description

When running pip debug in Python 3.13.0a5, it raises AttributeError.

It seems that this error was caused by removal of importlib.resources.open_text in 3.13.

Expected behavior

pip debug doesn't raise AttributeError: module 'importlib.resources' has no attribute 'open_text'

pip version

24.0

Python version

Python 3.13.0a5

OS

Ubuntu 23.10

How to Reproduce

  1. pyenv install 3.13.0a5 && pyenv global 3.13.0a5
  2. pip debug

Output

$ pip debug
WARNING: This command is only meant for debugging. Do not use this with automation for parsin
g and getting these details, since the output and options of this command may change without
notice.
pip version: pip 24.0 from /home/eggplants/.pyenv/versions/3.13.0a5/lib/python3.13/site-packa
ges/pip (python 3.13)
sys.version: 3.13.0a5 (main, Mar 18 2024, 23:49:36) [GCC 13.2.0]
sys.executable: /home/eggplants/.pyenv/versions/3.13.0a5/bin/python3.13
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /home/eggplants/.pyenv/versions/3.13.0a5/lib/python3.13/site-pac
kages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
ERROR: Exception:
Traceback (most recent call last):
  File "/home/eggplants/.pyenv/versions/3.13.0a5/lib/python3.13/site-packages/pip/_internal/c
li/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ~~~~~~~~^^^^^^^
  File "/home/eggplants/.pyenv/versions/3.13.0a5/lib/python3.13/site-packages/pip/_internal/c
ommands/debug.py", line 197, in run
    show_vendor_versions()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/home/eggplants/.pyenv/versions/3.13.0a5/lib/python3.13/site-packages/pip/_internal/c
ommands/debug.py", line 106, in show_vendor_versions
    vendor_txt_versions = create_vendor_txt_map()
                          ~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/eggplants/.pyenv/versions/3.13.0a5/lib/python3.13/site-packages/pip/_internal/c
ommands/debug.py", line 38, in create_vendor_txt_map
    with importlib.resources.open_text("pip._vendor", "vendor.txt") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'importlib.resources' has no attribute 'open_text'

Code of Conduct

@eggplants eggplants added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 23, 2024
eggplants added a commit to eggplants/pip that referenced this issue Mar 23, 2024
@eggplants eggplants changed the title pip debug pip debug causes AttributeError in Python 3.13 Mar 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant