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

Fix Python 3.8 compatibility issue #5235

Merged
merged 1 commit into from
Mar 7, 2024
Merged
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
8 changes: 4 additions & 4 deletions py/server/deephaven/_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys
from dataclasses import dataclass, field
from functools import wraps
from typing import Callable, List, Any, Union, Tuple, _GenericAlias
from typing import Callable, List, Any, Union, Tuple, _GenericAlias, Set

from deephaven._dep import soft_dependency

Expand All @@ -34,8 +34,8 @@
@dataclass
class _ParsedParam:
name: Union[str, int] = field(init=True)
orig_types: set[type] = field(default_factory=set)
encoded_types: set[str] = field(default_factory=set)
orig_types: Set[type] = field(default_factory=set)
encoded_types: Set[str] = field(default_factory=set)
none_allowed: bool = False
has_array: bool = False
int_char: str = None
Expand Down Expand Up @@ -266,7 +266,7 @@ def _parse_signature(fn: Callable) -> _ParsedSignature:
return p_sig


def _is_from_np_type(param_types: set[type], np_type_char: str) -> bool:
def _is_from_np_type(param_types: Set[type], np_type_char: str) -> bool:
""" Determine if the given numpy type char comes for a numpy type in the given set of parameter type annotations"""
for t in param_types:
if issubclass(t, np.generic) and np.dtype(t).char == np_type_char:
Expand Down
Loading