Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: relax typing_extensions version constraint #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 6 additions & 2 deletions reacton/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
from typing import Callable, TypeVar, cast

import ipywidgets as widgets
import typing_extensions

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

T = TypeVar("T")


Expand Down
Loading