From 2116386c7752a5c78425419df8e28f654c893045 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Sun, 2 Jun 2024 14:51:56 +0100 Subject: [PATCH] Update 'typing_extensions' to >=4.6.0 to fix python 3.12 error (#17312) With earlier versions of typing_extensions, the following traceback is seen: ``` Traceback (most recent call last): File ".../bin/mypy", line 5, in from mypy.__main__ import console_entry File ".../lib/python3.12/site-packages/mypy/__main__.py", line 9, in from mypy.main import main, process_options File ".../lib/python3.12/site-packages/mypy/main.py", line 12, in from typing_extensions import Final File ".../lib/python3.12/site-packages/typing_extensions.py", line 1174, in 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 https://github.com/python/typing_extensions/pull/162, which is included in the 4.6.0 release. --- mypy-requirements.txt | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy-requirements.txt b/mypy-requirements.txt index f81412be761e..341052822f25 100644 --- a/mypy-requirements.txt +++ b/mypy-requirements.txt @@ -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' diff --git a/pyproject.toml b/pyproject.toml index 35f1592ca83c..33d4ec094f50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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