Skip to content

Commit 088a243

Browse files
rm py3.9 __subclasscheck__ workaround (#240)
It seems to be causing issues in TileDB-SOMA CI (single-cell-data/TileDB-SOMA#3246), and it doesn't seem to be necessary for any tests.
1 parent aba232b commit 088a243

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

python-spec/src/somacore/types.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
their own internal type-checking purposes.
66
"""
77

8-
import sys
98
from concurrent import futures
109
from typing import (
11-
TYPE_CHECKING,
12-
NoReturn,
1310
Optional,
1411
Sequence,
1512
Tuple,
@@ -85,13 +82,6 @@ def stop(self) -> Optional[_T_co]: ...
8582
@property
8683
def step(self) -> Optional[_T_co]: ...
8784

88-
if sys.version_info < (3, 10) and not TYPE_CHECKING:
89-
# Python 3.9 and below have a bug where any Protocol with a @property
90-
# was always regarded as runtime-checkable.
91-
@classmethod
92-
def __subclasscheck__(cls, __subclass: type) -> NoReturn:
93-
raise TypeError("Slice is not a runtime-checkable protocol")
94-
9585

9686
def is_slice_of(__obj: object, __typ: Type[_T]) -> TypeGuard[Slice[_T]]:
9787
return (

0 commit comments

Comments
 (0)