diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 29f4986..41395f0 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -243,7 +243,11 @@ from traitlets.config.configurable import Configurable import __main__ from typing import cast -from typing_extensions import TypedDict, NotRequired, Protocol, TypeAlias, TypeGuard + +if sys.version_info < (3, 12): + from typing_extensions import TypedDict, NotRequired, Protocol, TypeAlias, TypeGuard +else: + from typing import TypedDict, NotRequired, Protocol, TypeAlias, TypeGuard # skip module docstests @@ -260,8 +264,6 @@ except ImportError: JEDI_INSTALLED = False -if GENERATING_DOCUMENTATION: - from typing import TypedDict # ----------------------------------------------------------------------------- # Globals diff --git a/pyproject.toml b/pyproject.toml index 35ae60d..bdea229 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,6 @@ doc = [ "sphinx-rtd-theme", "sphinx>=1.3", "sphinxcontrib-jquery", - "typing_extensions", ] kernel = [ "ipykernel",