Skip to content

Commit

Permalink
Update 'typing_extensions' to >=4.6.0 to fix python 3.12 error (#17312)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
benjamb committed Jun 2, 2024
1 parent c3bbd1c commit 2116386
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mypy-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NOTE: this needs to be kept in sync with the "requires" list in pyproject.toml
typing_extensions>=4.1.0
typing_extensions>=4.6.0
mypy_extensions>=1.0.0
tomli>=1.1.0; python_version<'3.11'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
"setuptools >= 40.6.2",
"wheel >= 0.30.0",
# the following is from mypy-requirements.txt
"typing_extensions>=4.1.0",
"typing_extensions>=4.6.0",
"mypy_extensions>=1.0.0",
"tomli>=1.1.0; python_version<'3.11'",
# the following is from build-requirements.txt
Expand Down

0 comments on commit 2116386

Please sign in to comment.