Skip to content

Continous Integration on 3.10.beta and 3.11.alpha: error from pip code "AttributeError: module 'types' has no attribute 'UnionType'. Did you mean: 'FunctionType'?" #66

@SylvainDe

Description

@SylvainDe

First failure

Build: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/10136272986 #1384

Run # Information about Python version
  # Information about Python version
  python -VV
  python -c "import sys; print(sys.version_info)" || true
  python -c "import sys; print(sys._git)" || true
  # Information about pip version
  pip --version
  # Information about Python builtins/keywords
  python -c "import sys; import keyword; print({sys.version_info: {'kword': set(keyword.kwlist), 'builtins': set(dir(__builtins__))}})" || true
  python -c "import sysconfig; print(dir(sysconfig))" || true
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.0-beta.4/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.0-beta.4/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.0-beta.4/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.0-beta.4/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib
Python 3.10.0b4 (default, Jul 11 2021, 16:41:33) [GCC 9.3.0]
sys.version_info(major=3, minor=10, micro=0, releaselevel='beta', serial=4)
('CPython', '', '')
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/cli/main.py", line 11, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/cli/main_parser.py", line 9, in <module>
    from pip._internal.build_env import get_runnable_pip
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/build_env.py", line 18, in <module>
    from pip._internal.cli.spinners import open_spinner
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/cli/spinners.py", line 9, in <module>
    from pip._internal.utils.logging import get_indentation
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/utils/logging.py", line 29, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 43, in <module>
    from pip._internal.utils.retry import retry
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_internal/utils/retry.py", line 5, in <module>
    from pip._vendor.typing_extensions import ParamSpec
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_vendor/typing_extensions.py", line 3529, in <module>
    def get_protocol_members(tp: type, /) -> typing.FrozenSet[str]:
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/typing.py", line 298, in inner
    return cached(*args, **kwds)
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/typing.py", line 1079, in __getitem__
    return self.copy_with(params)
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/typing.py", line 1082, in copy_with
    return _GenericAlias(self.__origin__, params,
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/typing.py", line 972, in __init__
    self.__parameters__ = _collect_type_vars(params, typevar_types=_typevar_types)
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_vendor/typing_extensions.py", line 3023, in _collect_type_vars
    if _should_collect_from_parameters(t):
  File "/opt/hostedtoolcache/Python/3.10.0-beta.4/x64/lib/python3.10/site-packages/pip/_vendor/typing_extensions.py", line 156, in _should_collect_from_parameters
    t, (typing._GenericAlias, _types.GenericAlias, _types.UnionType)
AttributeError: module 'types' has no attribute 'UnionType'. Did you mean: 'FunctionType'?
Error: Process completed with exit code 1.

Last success

Build: https://github.com/SylvainDe/DidYouMean-Python/actions/runs/10127727200 #1383

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions