diff --git a/stdlib/_interpreters.pyi b/stdlib/_interpreters.pyi index 3885669278f5..a7ef6d1fcecf 100644 --- a/stdlib/_interpreters.pyi +++ b/stdlib/_interpreters.pyi @@ -1,3 +1,4 @@ +import sys import types from collections.abc import Callable from typing import Any, Final, Literal, SupportsIndex, TypeAlias, TypeVar, overload @@ -10,7 +11,12 @@ _SharedDict: TypeAlias = dict[str, Any] # many objects can be shared class InterpreterError(Exception): ... class InterpreterNotFoundError(InterpreterError): ... -class NotShareableError(ValueError): ... + +if sys.version_info >= (3, 14): + class NotShareableError(TypeError): ... + +else: + class NotShareableError(ValueError): ... @disjoint_base class CrossInterpreterBufferView: