From 2d4400469eb12f8ecf6c8a1359825bc89ff1d592 Mon Sep 17 00:00:00 2001 From: Nicolas Le Manchet Date: Fri, 17 Jun 2022 18:27:24 +0200 Subject: [PATCH] Support Python 3.10 Fixes #17 --- .github/workflows/tests.yml | 4 ++-- setup.py | 1 + spinach/brokers/memory.py | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ced83cd..54ac128 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9, pypy3] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"] services: redis: @@ -51,4 +51,4 @@ jobs: - name: Coveralls Finished uses: AndreMiras/coveralls-python-action@develop with: - parallel-finished: true \ No newline at end of file + parallel-finished: true diff --git a/setup.py b/setup.py index f975c50..9969832 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', ], keywords='task queue jobs redis', diff --git a/spinach/brokers/memory.py b/spinach/brokers/memory.py index ba4a641..fed5aed 100644 --- a/spinach/brokers/memory.py +++ b/spinach/brokers/memory.py @@ -126,7 +126,10 @@ def inspect_periodic_tasks(self) -> List[Tuple[int, str]]: Used only for debugging and during tests. """ - return [(int(e[0]), e[3][0].name) for e in self._scheduler.queue] + return [ + (int(e.time), e.argument[0].name) + for e in self._scheduler.queue + ] def _get_next_future_job(self) -> Optional[Job]: with self._lock: