NicolasLM / spinach

Modern Redis task queue for Python 3
https://spinach.readthedocs.io
BSD 2-Clause "Simplified" License
63 stars 4 forks source link

Spinach no longer passes tests in Python >= 3.11 #29

Closed 0xDEC0DE closed 6 months ago

0xDEC0DE commented 6 months ago

Steps to reproduce

  1. Set up a Python 3.11 or 3.12 runtime
  2. Fix tox.ini to use allowlist_externals instead of the obsolete whitelist_externals
  3. Run tox

Expected result

Tests pass

Actual behavior

Python 3.11

FAILED tests/test_engine.py::test_schedule_at - spinach.exc.InvalidJobSignatureError: Arguments of job not compatible with task bar_task: got an unexpected keyword...
FAILED tests/test_engine.py::test_schedule_batch - spinach.exc.InvalidJobSignatureError: Arguments of job not compatible with task bar_task: got an unexpected keyword...

Python 3.12

FAILED tests/test_brokers.py::test_wait_for_events_no_future_job[MemoryBroker] - AttributeError: 'called_once' is not a valid assertion. Use a spec for the mock if 'called_once' is meant to be an attribute.
FAILED tests/test_brokers.py::test_wait_for_events_no_future_job[RedisBroker] - AttributeError: 'called_once' is not a valid assertion. Use a spec for the mock if 'called_once' is meant to be an attribute.
FAILED tests/test_engine.py::test_schedule_at - spinach.exc.InvalidJobSignatureError: Arguments of job not compatible with task bar_task: got an unexpected keyword argument 'three'
FAILED tests/test_engine.py::test_schedule_batch - spinach.exc.InvalidJobSignatureError: Arguments of job not compatible with task bar_task: got an unexpected keyword argument 'three'
FAILED tests/test_utils.py::test_exponential_backoff - Failed: DID NOT RAISE <class 'ValueError'>

Miscellany

Tests DO pass when run against a Python 3.8 runtime