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

Update 'typing_extensions' to >=4.6.0 to fix python 3.12 error #17312

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

benjamb
Copy link
Contributor

@benjamb benjamb commented Jun 2, 2024

With earlier versions of typing_extensions, the following traceback is seen:

Traceback (most recent call last):
  File ".../bin/mypy", line 5, in <module>
    from mypy.__main__ import console_entry
  File ".../lib/python3.12/site-packages/mypy/__main__.py", line 9, in <module>
    from mypy.main import main, process_options
  File ".../lib/python3.12/site-packages/mypy/main.py", line 12, in <module>
    from typing_extensions import Final
  File ".../lib/python3.12/site-packages/typing_extensions.py", line 1174, in <module>
    class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
TypeError: type 'typing.TypeVar' is not an acceptable base type

The error is addressed in typing_extensions in
python/typing_extensions#162, which is included
in the 4.6.0 release.

(Explain how this PR changes mypy.)

With earlier versions of typing_extensions, the following traceback is
seen:

```
Traceback (most recent call last):
  File ".../bin/mypy", line 5, in <module>
    from mypy.__main__ import console_entry
  File ".../lib/python3.12/site-packages/mypy/__main__.py", line 9, in <module>
    from mypy.main import main, process_options
  File ".../lib/python3.12/site-packages/mypy/main.py", line 12, in <module>
    from typing_extensions import Final
  File ".../lib/python3.12/site-packages/typing_extensions.py", line 1174, in <module>
    class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
TypeError: type 'typing.TypeVar' is not an acceptable base type
```

The error is addressed in typing_extensions in
 python/typing_extensions#162, which is included
in the 4.6.0 release.
Copy link
Contributor

github-actions bot commented Jun 2, 2024

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JelleZijlstra JelleZijlstra merged commit 2116386 into python:master Jun 2, 2024
18 checks passed
JelleZijlstra pushed a commit that referenced this pull request Jun 2, 2024
…places (#17313)

Followup to #17312. (Can't say I fully understand why we have to have
this pin in three places :)
GiorgosPapoutsakis pushed a commit to GiorgosPapoutsakis/mypy that referenced this pull request Jun 3, 2024
…n#17312)

With earlier versions of typing_extensions, the following traceback is
seen:

```
Traceback (most recent call last):
  File ".../bin/mypy", line 5, in <module>
    from mypy.__main__ import console_entry
  File ".../lib/python3.12/site-packages/mypy/__main__.py", line 9, in <module>
    from mypy.main import main, process_options
  File ".../lib/python3.12/site-packages/mypy/main.py", line 12, in <module>
    from typing_extensions import Final
  File ".../lib/python3.12/site-packages/typing_extensions.py", line 1174, in <module>
    class TypeVar(typing.TypeVar, _DefaultMixin, _root=True):
TypeError: type 'typing.TypeVar' is not an acceptable base type
```

The error is addressed in typing_extensions in
 python/typing_extensions#162, which is included
in the 4.6.0 release.
GiorgosPapoutsakis pushed a commit to GiorgosPapoutsakis/mypy that referenced this pull request Jun 3, 2024
…places (python#17313)

Followup to python#17312. (Can't say I fully understand why we have to have
this pin in three places :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants