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 19.1.1 and earlier not supported on Python 3.10 #2599

Comments

@jaraco
Copy link
Member

jaraco commented Mar 7, 2021

Integration tests try to use old versions of pip that are not compatible with Python 3.10 due to collections.abc aliases removed from collections.

Originally posted by @hroncok in #2558 (comment)

@jaraco
Copy link
Member Author

jaraco commented Mar 7, 2021

With some bisection, I determined that Pip 19.2 has the fix so 19.1.1 and earlier will never work on Python 3.10.

etuptools main $ python3.10 -m pip-run 'pip<19.2' -- -m pip --version
Collecting pip<19.2
  Using cached pip-19.1.1-py2.py3-none-any.whl (1.4 MB)
Installing collected packages: pip
Successfully installed pip-19.1.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pip-run 8.4.2 requires pip>=19.3, but you have pip 19.1.1 which is incompatible.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/__main__.py", line 16, in <module>
    from pip._internal import main as _main  # isort:skip # noqa
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_internal/__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_internal/cli/autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_internal/cli/main_parser.py", line 12, in <module>
    from pip._internal.commands import (
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_internal/commands/__init__.py", line 6, in <module>
    from pip._internal.commands.completion import CompletionCommand
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_internal/commands/completion.py", line 6, in <module>
    from pip._internal.cli.base_command import Command
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_internal/cli/base_command.py", line 25, in <module>
    from pip._internal.index import PackageFinder
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_internal/index.py", line 14, in <module>
    from pip._vendor import html5lib, requests, six
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_vendor/html5lib/__init__.py", line 25, in <module>
    from .html5parser import HTMLParser, parse, parseFragment
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_vendor/html5lib/html5parser.py", line 8, in <module>
    from . import _tokenizer
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_vendor/html5lib/_tokenizer.py", line 16, in <module>
    from ._trie import Trie
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_vendor/html5lib/_trie/__init__.py", line 3, in <module>
    from .py import Trie as PyTrie
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_vendor/html5lib/_trie/py.py", line 6, in <module>
    from ._base import Trie as ABCTrie
  File "/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-2a9ynblh/pip/_vendor/html5lib/_trie/_base.py", line 3, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)

@jaraco jaraco closed this as completed in b2f7b8f Mar 7, 2021
@hroncok
Copy link
Contributor

hroncok commented Mar 7, 2021

Awesome, thanks!

This was referenced Mar 14, 2021
This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment