Skip to content

Commit 984c116

Browse files
author
Andrew Brookins
committed
Drop Protocol class to support Python 3.7
1 parent 3ee2252 commit 984c116

File tree

3 files changed

+3
-26
lines changed

3 files changed

+3
-26
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redis-om"
3-
version = "0.0.7"
3+
version = "0.0.8"
44
description = "A high-level library containing useful Redis abstractions and tools, like an ORM and leaderboard."
55
authors = ["Andrew Brookins <[email protected]>"]
66
maintainers = ["Andrew Brookins <[email protected]>"]

redis_om/model/model.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -136,29 +136,6 @@ def decode_redis_value(
136136
return obj.decode(encoding)
137137

138138

139-
class ExpressionProtocol(Protocol):
140-
op: Operators
141-
left: ExpressionOrModelField
142-
right: ExpressionOrModelField
143-
144-
def __invert__(self) -> "Expression":
145-
pass
146-
147-
def __and__(self, other: ExpressionOrModelField):
148-
pass
149-
150-
def __or__(self, other: ExpressionOrModelField):
151-
pass
152-
153-
@property
154-
def name(self) -> str:
155-
raise NotImplementedError
156-
157-
@property
158-
def tree(self) -> str:
159-
raise NotImplementedError
160-
161-
162139
@dataclasses.dataclass
163140
class NegatedExpression:
164141
"""A negated Expression object.
@@ -814,7 +791,7 @@ def __getitem__(self, item: int):
814791
return query.execute()[0]
815792

816793

817-
class PrimaryKeyCreator(Protocol):
794+
class PrimaryKeyCreator(abc.ABC):
818795
def create_pk(self, *args, **kwargs) -> str:
819796
"""Create a new primary key"""
820797

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
skipsdist = true
3-
envlist = py38, py39, py310
3+
envlist = py37, py38, py39, py310
44

55
[testenv]
66
whitelist_externals = poetry

0 commit comments

Comments
 (0)