You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Create a virtualenv for Python 3.10
Run PYTHONWARNINGS=once pip --version
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_varspip 21.1.2 from /tmp/310-venv/lib/python3.10/site-packages/pip (python 3.10)
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
PYTHONWARNINGS=once pip --version
<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
Code of Conduct
The text was updated successfully, but these errors were encountered: