KEMBAR78
mypy 1.4.0 is not compatible with typing-extensions 3.10 version · Issue #15487 · python/mypy · GitHub
Skip to content

mypy 1.4.0 is not compatible with typing-extensions 3.10 version #15487

@olgasentemova

Description

@olgasentemova

Bug Report

mypy 1.4.0 is not compatible with typing-extensions 3.10 version.

To Reproduce
Install mypy 1.4.0 on an environment where typing_extensions library has a 3.10 version
Python version is used 3.11

 pip3 show typing_extensions                    
Name: typing-extensions
Version: 3.10.0.2
Summary: Backported and Experimental Type Hints for Python 3.5+
Home-page: https://github.com/python/typing/blob/master/typing_extensions/README.rst
Author: Guido van Rossum, Jukka Lehtosalo, Łukasz Langa, Michael Lee
Author-email: levkivskyi@gmail.com
License: PSF
Location: /usr/local/lib/python3.11/site-packages
Requires: 
Required-by: mypy

pip3 list | grep mypy
mypy              1.4.0
mypy-extensions   1.0.0

run
mypy .
Expected Behavior

mypy starts and runs the analysis

Actual Behavior

mypy .               
Traceback (most recent call last):
  File "/usr/local/bin/mypy", line 5, in <module>
    from mypy.__main__ import console_entry
  File "/usr/local/lib/python3.11/site-packages/mypy/__main__.py", line 9, in <module>
    from mypy.main import main, process_options
  File "mypy/main.py", line 14, in <module>
  File "mypy/build.py", line 47, in <module>
  File "mypy/semanal_main.py", line 35, in <module>
  File "mypy/checker.py", line 27, in <module>
  File "mypy/checkexpr.py", line 13, in <module>
  File "mypy/applytype.py", line 5, in <module>
  File "mypy/subtypes.py", line 8, in <module>
  File "mypy/constraints.py", line 9, in <module>
  File "mypy/typeops.py", line 13, in <module>
  File "mypy/copytype.py", line 5, in <module>
  File "mypy/types.py", line 20, in <module>
    def f():
ImportError: cannot import name 'Self' from 'typing_extensions' (/usr/local/lib/python3.11/site-packages/typing_extensions.py)

Your Environment

  • Mypy version used: 1.4.0.
  • Mypy command-line flags: none
  • Mypy configuration options from mypy.ini (and other config files): none
  • Python version used: Python 3.11.4 (main, Jun 15 2023, 07:29:58) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions