diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80cc1d5..7bdcffc 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.8', '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.8' && matrix.toxenv == 'django42' uses: codecov/codecov-action@v3 with: flags: unittests diff --git a/edx_event_bus_redis/__init__.py b/edx_event_bus_redis/__init__.py index 7d8f35a..da95f68 100644 --- a/edx_event_bus_redis/__init__.py +++ b/edx_event_bus_redis/__init__.py @@ -5,6 +5,6 @@ from edx_event_bus_redis.internal.consumer import RedisEventConsumer from edx_event_bus_redis.internal.producer import create_producer -__version__ = '0.3.3' +__version__ = '0.4.0' default_app_config = 'edx_event_bus_redis.apps.EdxEventBusRedisConfig' # pylint: disable=invalid-name diff --git a/edx_event_bus_redis/internal/tests/test_message.py b/edx_event_bus_redis/internal/tests/test_message.py index 933cf66..4b155a7 100644 --- a/edx_event_bus_redis/internal/tests/test_message.py +++ b/edx_event_bus_redis/internal/tests/test_message.py @@ -2,6 +2,7 @@ Tests for message module. """ +import re from datetime import datetime, timezone from uuid import UUID @@ -68,14 +69,20 @@ def test_no_type(self): ) def test_no_event_data(self): - msg = (b'1', {b'id': b'629f9892-c258-11ed-8dac-1c83413013cb', b'event_data': self.event_data_bytes}) + msg = ( + b'1', + { + b'id': b'629f9892-c258-11ed-8dac-1c83413013cb', + b'event_data': self.event_data_bytes, + } + ) 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'", + expected_error_pattern = re.compile( + r"Error determining metadata from message headers: .*__init__\(\) " + r"missing 1 required positional argument: 'event_type'" ) + assert expected_error_pattern.search(str(excinfo.value)) is not None def test_bad_msg(self): """ diff --git a/setup.py b/setup.py index fbd52a8..5f5bbb5 100644 --- a/setup.py +++ b/setup.py @@ -154,11 +154,12 @@ def is_requirement(line): classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', - 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.12', ], ) diff --git a/tox.ini b/tox.ini index a961bd6..6e87e4a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,40} +envlist = py{38,312}-django{42} [pycodestyle] exclude = .git,.tox,migrations @@ -32,8 +32,8 @@ norecursedirs = .* docs requirements site-packages [testenv] deps = - django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 + django42: Django>=4.2,<5.0 + setuptools -r{toxinidir}/requirements/test.txt commands = python manage.py check @@ -64,6 +64,7 @@ allowlist_externals = rm touch deps = + setuptools -r{toxinidir}/requirements/quality.txt commands = touch tests/__init__.py