diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ceb20ed..d74fd786 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, django42] + python-version: ['3.8', '3.12'] + toxenv: [quality, docs, pii_check, django42] steps: - uses: actions/checkout@v4 diff --git a/Makefile b/Makefile index 6655b8ad..77885d0d 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy $(PIP_COMPILE) -o requirements/base.txt requirements/base.in $(PIP_COMPILE) -o requirements/test.txt requirements/test.in $(PIP_COMPILE) -o requirements/doc.txt requirements/doc.in - $(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in + $(PIP_COMPILE) --allow-unsafe -o requirements/quality.txt requirements/quality.in $(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in $(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in # Let tox control the Django version for tests diff --git a/event_routing_backends/backends/tests/test_events_router.py b/event_routing_backends/backends/tests/test_events_router.py index 2e5f5033..03fa8cc7 100644 --- a/event_routing_backends/backends/tests/test_events_router.py +++ b/event_routing_backends/backends/tests/test_events_router.py @@ -343,7 +343,7 @@ def test_time_to_send_no_data(self): @ddt.ddt -class TestAsyncEventsRouter(TestEventsRouter): # pylint: disable=test-inherits-tests +class TestAsyncEventsRouter(TestEventsRouter): """ Test the AsyncEventsRouter """ @@ -884,7 +884,7 @@ def test_successful_routing_of_bulk_events( @ddt.ddt -class TestSyncEventsRouter(TestEventsRouter): # pylint: disable=test-inherits-tests +class TestSyncEventsRouter(TestEventsRouter): # pylint: disable=E7603 """ Test the SyncEventsRouter """ diff --git a/event_routing_backends/processors/xapi/tests/test_xapi.py b/event_routing_backends/processors/xapi/tests/test_xapi.py index 7510f2e0..eaba4205 100644 --- a/event_routing_backends/processors/xapi/tests/test_xapi.py +++ b/event_routing_backends/processors/xapi/tests/test_xapi.py @@ -64,13 +64,14 @@ def test_send_method_with_successfull_flow(self, mocked_logger, mocked_get_trans self.processor([self.sample_event]) - self.assertIn(call(transformed_event.to_json()), mocked_logger.mock_calls) + self.assertIn(call.info(transformed_event.to_json()), mocked_logger.mock_calls) @patch( 'event_routing_backends.processors.xapi.transformer_processor.XApiTransformersRegistry.get_transformer' ) @patch('event_routing_backends.processors.xapi.transformer_processor.xapi_logger') def test_send_method_with_event_list_successfull_flow(self, mocked_logger, mocked_get_transformer): + transformed_event = Statement() transformed_event.object = Activity(id=str(uuid.uuid4())) mocked_transformer = MagicMock() @@ -78,8 +79,7 @@ def test_send_method_with_event_list_successfull_flow(self, mocked_logger, mocke mocked_get_transformer.return_value = mocked_transformer self.processor([self.sample_event]) - - self.assertIn(call(transformed_event.to_json()), mocked_logger.mock_calls) + self.assertIn(call.info(transformed_event.to_json()), mocked_logger.mock_calls) @patch( 'event_routing_backends.processors.xapi.transformer_processor.XApiTransformersRegistry.get_transformer' diff --git a/requirements/base.txt b/requirements/base.txt index f4cd3ecb..5a44fdb6 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -16,8 +16,9 @@ async-timeout==4.0.3 # via redis attrs==23.2.0 # via openedx-events -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # celery # django # djangorestframework diff --git a/requirements/constraints.txt b/requirements/constraints.txt index abd6efd5..ff633a81 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -23,3 +23,5 @@ sphinx==4.2.0 # This pin can be removed once sphinx constraint is removed. docutils<0.18 doc8<1.0.0 +# it is not availablein python3.9 +backports.zoneinfo;python_version<"3.9" diff --git a/requirements/dev.txt b/requirements/dev.txt index 301676ec..270ef207 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -33,8 +33,9 @@ attrs==23.2.0 # via # -r requirements/quality.txt # openedx-events -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/quality.txt # celery # django @@ -494,6 +495,7 @@ wcwidth==0.2.13 wheel==0.43.0 # via # -r requirements/pip-tools.txt + # -r requirements/quality.txt # pip-tools zipp==3.18.1 # via diff --git a/requirements/doc.txt b/requirements/doc.txt index 7d8e3257..504debd8 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -34,8 +34,9 @@ babel==2.14.0 # via # pydata-sphinx-theme # sphinx -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/test.txt # celery # django @@ -214,10 +215,6 @@ isodate==0.6.1 # via -r requirements/test.txt jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.3 # via # -r requirements/test.txt @@ -356,8 +353,6 @@ rfc3986==2.0.0 # via twine rich==13.7.1 # via twine -secretstorage==3.3.3 - # via keyring six==1.16.0 # via # -r requirements/test.txt diff --git a/requirements/quality.in b/requirements/quality.in index 0bd84a64..eca6ed3f 100644 --- a/requirements/quality.in +++ b/requirements/quality.in @@ -7,3 +7,5 @@ edx-lint # edX pylint rules and plugins isort # to standardize order of imports pycodestyle # PEP 8 compliance validation pydocstyle # PEP 257 compliance validation +wheel +setuptools diff --git a/requirements/quality.txt b/requirements/quality.txt index 21c6e72d..dc5dea9e 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -30,8 +30,9 @@ attrs==23.2.0 # via # -r requirements/test.txt # openedx-events -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/test.txt # celery # django @@ -373,3 +374,9 @@ wcwidth==0.2.13 # via # -r requirements/test.txt # prompt-toolkit +wheel==0.42.0 + # via -r requirements/quality.in + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.1.0 + # via -r requirements/quality.in diff --git a/requirements/test.txt b/requirements/test.txt index 8e70470f..be7d737b 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -26,8 +26,9 @@ attrs==23.2.0 # via # -r requirements/base.txt # openedx-events -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # celery # django diff --git a/setup.py b/setup.py index 7109d6e9..b04c07bc 100644 --- a/setup.py +++ b/setup.py @@ -155,13 +155,14 @@ 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.11', + 'Programming Language :: Python :: 3.12', ], entry_points={ "lms.djangoapp": [ diff --git a/tox.ini b/tox.ini index e017a3e0..73d3ff43 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,42}, quality, docs, pii_check +envlist = py{38}-django{42}, quality, docs, pii_check [doc8] ignore = D001 @@ -35,7 +35,6 @@ norecursedirs = .* docs requirements site-packages [testenv] deps = - django32: Django>=3.2,<4.0 django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt commands =