From 796fa247057fce6114421960bf1f1e8d07fc64c6 Mon Sep 17 00:00:00 2001 From: a68366 Date: Mon, 2 Jan 2023 12:24:31 +0300 Subject: [PATCH 1/4] tests: make Keys a simple class, not Enum --- tests/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index c62f77ba..ad8092e5 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,7 +1,4 @@ -from enum import Enum - - -class Keys(str, Enum): +class Keys: KEY: str = "key" KEY_1: str = "random" KEY_LOCK: str = "key-lock" From 29eee6a93ed092b266eab44816f0e667403a1abb Mon Sep 17 00:00:00 2001 From: a68366 Date: Mon, 2 Jan 2023 12:32:40 +0300 Subject: [PATCH 2/4] CI: add python 3.11 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc6819c2..31ef98e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: strategy: matrix: os: [ubuntu] - pyver: ['3.7', '3.8', '3.9', '3.10'] + pyver: ['3.7', '3.8', '3.9', '3.10', '3.11'] redis: ['latest'] ujson: [''] include: From fe117ae2b2477837067eb07d45430e05d6c3a409 Mon Sep 17 00:00:00 2001 From: a68366 Date: Mon, 2 Jan 2023 12:56:20 +0300 Subject: [PATCH 3/4] tests: make Keys enum behave the same with python 3.11 --- tests/utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index ad8092e5..2efabe74 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,4 +1,10 @@ -class Keys: +from enum import Enum + + +class Keys(str, Enum): KEY: str = "key" KEY_1: str = "random" KEY_LOCK: str = "key-lock" + + def __format__(self, spec): + return self.value From 500c59ccd4893a5fce979f8c83f03b955936c15f Mon Sep 17 00:00:00 2001 From: a68366 Date: Mon, 2 Jan 2023 12:58:08 +0300 Subject: [PATCH 4/4] remove trailing whitespaces --- tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 2efabe74..68c45f26 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -5,6 +5,6 @@ class Keys(str, Enum): KEY: str = "key" KEY_1: str = "random" KEY_LOCK: str = "key-lock" - + def __format__(self, spec): return self.value