typing extensions is an optional requirement for py>3.10, therefore

TypeVarTuple and Unpack need additional handling see
https://docs.python.org/3.9/library/typing.html

see #5695
This commit is contained in:
Sebastian Mohr 2025-04-02 14:43:38 +02:00
parent 030fd1fcf5
commit bcae6429a4

View file

@ -36,9 +36,13 @@ from __future__ import annotations
import queue
import sys
from threading import Lock, Thread
from typing import Callable, Generator
from typing import Callable, Generator, TypeVar
if sys.version_info >= (3, 11):
from typing import TypeVarTuple, Unpack
else:
from typing_extensions import TypeVar, TypeVarTuple, Unpack
from typing_extensions import TypeVar, TypeVarTuple, Unpack
BUBBLE = "__PIPELINE_BUBBLE__"
POISON = "__PIPELINE_POISON__"