Skip to content

Commit

Permalink
feat: relax typing_extensions version constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
egormkn committed Jul 22, 2024
1 parent 16518bf commit b8f8c0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = {file = "LICENSE"}
dynamic = ["version", "description"]
dependencies = [
"ipywidgets",
"typing_extensions >= 4.1.1",
"typing_extensions >= 3.7.0",
]

classifiers = [
Expand Down
8 changes: 6 additions & 2 deletions reacton/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import ipywidgets
import ipywidgets as widgets
import traitlets
import typing_extensions
from typing_extensions import Literal, Protocol

import reacton.logging # noqa: F401 # has sidefx
Expand Down Expand Up @@ -87,7 +86,12 @@ def get():
V = TypeVar("V") # used for value type of widget
V2 = TypeVar("V2") # used for value type of widget
E = TypeVar("E") # used for elements
P = typing_extensions.ParamSpec("P")

try:
from typing_extensions import ParamSpec
P = ParamSpec("P")
except ImportError:
P = ...

WidgetOrList = Union[widgets.Widget, List[widgets.Widget]]
EffectCleanupCallable = Callable[[], None]
Expand Down

0 comments on commit b8f8c0d

Please sign in to comment.