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

Deprecation warnings emitted by vendored six versions #10043

Closed
1 task done
domdfcoding opened this issue Jun 7, 2021 · 0 comments · Fixed by #10044
Closed
1 task done

Deprecation warnings emitted by vendored six versions #10043

domdfcoding opened this issue Jun 7, 2021 · 0 comments · Fixed by #10044
Labels
type: bug A confirmed bug or unintended behavior

Comments

@domdfcoding
Copy link
Contributor

Description

The currently vendored versions of six (1.15 directly, https://github.com/pypa/pip/blob/main/src/pip/_vendor/six.py, 1.12 via urllib3 https://github.com/pypa/pip/blob/main/src/pip/_vendor/urllib3/packages/six.py) do not have the fixes for Python 3.10 added in benjaminp/six#343 and benjaminp/six#352.

See benjaminp/six#341 for context.

Vendoring six 1.16 will make the warnings go away. The latest version of urllib3 includes six 1.16.

Expected behavior

I did not expect any deprecation warnings related to this.

pip version

21.1.2

Python version

3.10.0b2

OS

Ubuntu 20.04

How to Reproduce

  1. Create a virtualenv for Python 3.10
  2. Run PYTHONWARNINGS=once pip --version
  3. Observe several deprecation warnings in the form <frozen importlib._bootstrap>:914: ImportWarning: ....

To confirm the warnings were coming from the vendored versions of six I renamed the two instances of _SixMetaPathImporter to _VendoredSixMetaPathImporter (in _vendor) and _urllibSixMetaPathImporter (in _vendor/urllib3/packages).

Output

$ PYTHONWARNINGS=once pip --version
/tmp/310-venv/lib/python3.10/site-packages/pip/_vendor/packaging/tags.py:7: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils.util
<frozen importlib._bootstrap>:914: ImportWarning: _VendoredSixMetaPathImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:671: ImportWarning: _VendoredSixMetaPathImporter.exec_module() not found; falling back to load_module()
<frozen importlib._bootstrap>:914: ImportWarning: _VendoredSixMetaPathImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: _urllibSixMetaPathImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:671: ImportWarning: _urllibSixMetaPathImporter.exec_module() not found; falling back to load_module()
<frozen importlib._bootstrap>:914: ImportWarning: _VendoredSixMetaPathImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: _urllibSixMetaPathImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: _VendoredSixMetaPathImporter.find_spec() not found; falling back to find_module()
<frozen importlib._bootstrap>:914: ImportWarning: _urllibSixMetaPathImporter.find_spec() not found; falling back to find_module()
/usr/lib/python3.10/distutils/command/install.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
  from distutils.sysconfig import get_config_vars
pip 21.1.2 from /tmp/310-venv/lib/python3.10/site-packages/pip (python 3.10)

Code of Conduct

@domdfcoding domdfcoding added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jun 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2021
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Mar 17, 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