mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Fix typing_extensions requirement inconsistency (#5700)
Typing Extensions is an optional requirement for `python>3.10`, thus TypeVarTuple and Unpack need another import in higher python versions as `typing_extensions` is not available see https://docs.python.org/3.10/library/typing.html for supported types close #5695
This commit is contained in:
commit
6895a946e5
1 changed files with 5 additions and 2 deletions
|
|
@ -36,9 +36,12 @@ from __future__ import annotations
|
|||
import queue
|
||||
import sys
|
||||
from threading import Lock, Thread
|
||||
from typing import Callable, Generator
|
||||
from typing import Callable, Generator, TypeVar
|
||||
|
||||
from typing_extensions import TypeVar, TypeVarTuple, Unpack
|
||||
if sys.version_info >= (3, 11):
|
||||
from typing import TypeVarTuple, Unpack
|
||||
else:
|
||||
from typing_extensions import TypeVarTuple, Unpack
|
||||
|
||||
BUBBLE = "__PIPELINE_BUBBLE__"
|
||||
POISON = "__PIPELINE_POISON__"
|
||||
|
|
|
|||
Loading…
Reference in a new issue