diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ceb20ed..8ad81ff4 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.11', '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/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.in b/requirements/base.in index 96c2d8a3..f40cfed8 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -17,3 +17,4 @@ apache-libcloud # For bulk event log loading fasteners # Locking tools, required by apache-libcloud, but somehow not installed with it openedx-filters django-redis +setuptools # Python 3.12 requires setuptools package diff --git a/requirements/base.txt b/requirements/base.txt index d5055233..9066ec7e 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 bc9b0142..dd336731 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 67fb7ec1..9ddc68d6 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 @@ -106,7 +107,6 @@ ddt==1.7.2 django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/test.txt # django-config-models # django-crum # django-fernet-fields-v2 @@ -362,8 +362,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 @@ -455,4 +453,5 @@ zipp==3.18.1 # importlib-resources # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==69.2.0 + # via sphinx 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 4a467ae3..d1fa1635 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.43.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 46d95c72..27b5dd21 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 =