diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80cc1d5..0a279a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, docs, pii_check, django32, django40] + python-version: ['3.9', '3.10', '3.11', '3.12'] + toxenv: [quality, docs, pii_check, django42] steps: - uses: actions/checkout@v3 @@ -37,7 +37,7 @@ jobs: run: tox - name: Run coverage - if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' + if: matrix.python-version == '3.12' && matrix.toxenv == 'django42' uses: codecov/codecov-action@v3 with: flags: unittests diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index a22e9e6..d7898fd 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -15,7 +15,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.12 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 0f029d2..e1d54e1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,6 @@ sphinx: configuration: docs/conf.py python: - version: 3.8 + version: 3.12 install: - requirements: requirements/doc.txt diff --git a/README.rst b/README.rst index fa24213..868b012 100644 --- a/README.rst +++ b/README.rst @@ -76,7 +76,7 @@ One Time Setup cd event-bus-redis # Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it - mkvirtualenv -p python3.8 event-bus-redis + mkvirtualenv -p python3.12 event-bus-redis Every time you develop something in this repo diff --git a/docs/conf.py b/docs/conf.py index b8b4149..edd94a8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -490,8 +490,8 @@ def get_version(*file_paths): # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - 'python': ('https://docs.python.org/3.8', None), - 'django': ('https://docs.djangoproject.com/en/3.2/', 'https://docs.djangoproject.com/en/3.2/_objects/'), + 'python': ('https://docs.python.org/3.12', None), + 'django': ('https://docs.djangoproject.com/en/4.2/', 'https://docs.djangoproject.com/en/4.2/_objects/'), 'model_utils': ('https://django-model-utils.readthedocs.io/en/latest/', None), } diff --git a/edx_event_bus_redis/internal/tests/test_message.py b/edx_event_bus_redis/internal/tests/test_message.py index 933cf66..fa85c4f 100644 --- a/edx_event_bus_redis/internal/tests/test_message.py +++ b/edx_event_bus_redis/internal/tests/test_message.py @@ -72,9 +72,17 @@ def test_no_event_data(self): with pytest.raises(UnusableMessageError) as excinfo: RedisMessage.parse(msg, topic='some-local-topic') - assert excinfo.value.args == ( - "Error determining metadata from message headers: " - "__init__() missing 1 required positional argument: 'event_type'", + assert excinfo.value.args in ( + # Error in Python <=3.9, can be removed when we drop support for those + ( + "Error determining metadata from message headers: " + "__init__() missing 1 required positional argument: 'event_type'", + ), + # Error in Python 3.10 and above + ( + "Error determining metadata from message headers: " + "EventsMetadata.__init__() missing 1 required positional argument: 'event_type'", + ), ) def test_bad_msg(self): diff --git a/setup.py b/setup.py index fbd52a8..2520b6a 100644 --- a/setup.py +++ b/setup.py @@ -160,5 +160,9 @@ def is_requirement(line): 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], ) diff --git a/tox.ini b/tox.ini index a961bd6..af5598f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,40} +envlist = py{38,39,310,311,312}-django{42} [pycodestyle] exclude = .git,.tox,migrations @@ -32,8 +32,7 @@ norecursedirs = .* docs requirements site-packages [testenv] deps = - django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 + django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt commands = python manage.py check