diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 293091b7..47cf48cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.11'] + python-version: ['3.11', '3.12'] toxenv: ["django42", "quality", "docs"] steps: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4d3f7661..34ec5bfc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,14 @@ Change Log Unreleased __________ +[9.18.1] - 2025-02-13 +--------------------- + +Changed +~~~~~~~ + +* Added support for Python 3.12 + [9.18.0] - 2025-02-06 --------------------- diff --git a/openedx_events/__init__.py b/openedx_events/__init__.py index ff7ebcd2..2854517a 100644 --- a/openedx_events/__init__.py +++ b/openedx_events/__init__.py @@ -5,4 +5,4 @@ more information about the project. """ -__version__ = "9.18.0" +__version__ = "9.18.1" diff --git a/openedx_events/event_bus/avro/tests/test_avro.py b/openedx_events/event_bus/avro/tests/test_avro.py index 67c806bd..528e7ffe 100644 --- a/openedx_events/event_bus/avro/tests/test_avro.py +++ b/openedx_events/event_bus/avro/tests/test_avro.py @@ -212,7 +212,7 @@ def test_evolution_is_forward_compatible(self): # get stored schema schema_filename = f"{os.path.dirname(os.path.abspath(__file__))}/schemas/" \ - f"{signal.event_type.replace('.','+')}_schema.avsc" + f"{signal.event_type.replace('.', '+')}_schema.avsc" try: stored_schema = load_schema(schema_filename) except SchemaRepositoryError: # pragma: no cover @@ -243,7 +243,7 @@ def test_evolution_is_backward_compatible(self): # get stored schema schema_filename = f"{os.path.dirname(os.path.abspath(__file__))}/schemas/" \ - f"{signal.event_type.replace('.','+')}_schema.avsc" + f"{signal.event_type.replace('.', '+')}_schema.avsc" try: old_schema = load_schema(schema_filename) except SchemaRepositoryError: # pragma: no cover diff --git a/openedx_events/management/commands/generate_avro_schemas.py b/openedx_events/management/commands/generate_avro_schemas.py index 58083c49..181df33e 100644 --- a/openedx_events/management/commands/generate_avro_schemas.py +++ b/openedx_events/management/commands/generate_avro_schemas.py @@ -73,7 +73,7 @@ def handle(self, *args, **options): continue serializer = AvroSignalSerializer(signal) schema_dict = serializer.schema - filename = f"{signal.event_type.replace('.','+')}_schema.avsc" + filename = f"{signal.event_type.replace('.', '+')}_schema.avsc" root_path = import_module('openedx_events').__path__[0] folder_path = f"{root_path}/event_bus/avro/tests/schemas" full_file_name = f"{folder_path}/{filename}" diff --git a/openedx_events/tests/test_generate_avro_schemas.py b/openedx_events/tests/test_generate_avro_schemas.py index e881f119..7ee3e21e 100644 --- a/openedx_events/tests/test_generate_avro_schemas.py +++ b/openedx_events/tests/test_generate_avro_schemas.py @@ -68,7 +68,7 @@ def test_command_warns_if_schema_exists(self): @patch('os.path.exists', lambda path: path == TestGenerateAvroCommand.folder_path) def test_generate_all(self): load_all_signals() - expected_files = [f"{TestGenerateAvroCommand.folder_path}/{signal.event_type.replace('.','+')}_schema.avsc" + expected_files = [f"{TestGenerateAvroCommand.folder_path}/{signal.event_type.replace('.', '+')}_schema.avsc" for signal in OpenEdxPublicSignal.all_events() if signal.event_type not in KNOWN_UNSERIALIZABLE_SIGNALS] with patch("builtins.open", mock_open()) as mock_file: diff --git a/openedx_events/utils.py b/openedx_events/utils.py index eaa0b9c3..e23fdf3c 100644 --- a/openedx_events/utils.py +++ b/openedx_events/utils.py @@ -13,7 +13,8 @@ class ResponsePrettyPrinter(PrettyPrinter): This class pretty-prints the response of common Django Signals. """ - def _format(self, obj, stream, indent, allowance, context, level): # pylint: disable=arguments-renamed + # pylint: disable-next=arguments-renamed, too-many-positional-arguments + def _format(self, obj, stream, indent, allowance, context, level): """ Override format method exposing more information about functions/exceptions. diff --git a/requirements/base.in b/requirements/base.in index 5d6be5bc..b4b5eaa8 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,3 +7,4 @@ attrs fastavro edx-opaque-keys[django] edx-ccx-keys +setuptools diff --git a/requirements/base.txt b/requirements/base.txt index a309d8d2..eddc2a6e 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -43,7 +43,7 @@ psutil==6.1.1 # via edx-django-utils pycparser==2.22 # via cffi -pymongo==4.11 +pymongo==4.11.1 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils diff --git a/requirements/ci.txt b/requirements/ci.txt index cf0a9bcc..64fbd990 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -30,5 +30,5 @@ pyproject-api==1.9.0 # via tox tox==4.24.1 # via -r requirements/ci.in -virtualenv==20.29.1 +virtualenv==20.29.2 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 09c2c45e..e3536a82 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,8 +10,3 @@ # Common constraints for openedx repos -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt - -# Temporary solution since this version raises RecursionError for test_generate_avro_schemas.py -# This should be removed once the issue is fixed with a new astroid release or with a test_generate_avro_schemas.py -# module refactor. -astroid<3.0.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 232c9f4d..81839498 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,9 +8,8 @@ asgiref==3.8.1 # via # -r requirements/quality.txt # django -astroid==2.15.8 +astroid==3.3.8 # via - # -c requirements/constraints.txt # -r requirements/quality.txt # pylint # pylint-celery @@ -67,11 +66,11 @@ colorama==0.4.6 # via # -r requirements/ci.txt # tox -coverage[toml]==7.6.11 +coverage[toml]==7.6.12 # via # -r requirements/quality.txt # pytest-cov -cryptography==44.0.0 +cryptography==44.0.1 # via # -r requirements/quality.txt # secretstorage @@ -143,7 +142,7 @@ iniconfig==2.0.0 # via # -r requirements/quality.txt # pytest -isort==5.13.2 +isort==6.0.0 # via # -r requirements/quality.txt # pylint @@ -173,10 +172,6 @@ keyring==25.6.0 # via # -r requirements/quality.txt # twine -lazy-object-proxy==1.10.0 - # via - # -r requirements/quality.txt - # astroid markdown-it-py==3.0.0 # via # -r requirements/quality.txt @@ -254,7 +249,7 @@ pygments==2.19.1 # diff-cover # readme-renderer # rich -pylint==2.17.7 +pylint==3.3.4 # via # -r requirements/quality.txt # edx-lint @@ -265,7 +260,7 @@ pylint-celery==0.3 # via # -r requirements/quality.txt # edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via # -r requirements/quality.txt # edx-lint @@ -274,7 +269,7 @@ pylint-plugin-utils==0.8.2 # -r requirements/quality.txt # pylint-celery # pylint-django -pymongo==4.11 +pymongo==4.11.1 # via # -r requirements/quality.txt # edx-opaque-keys @@ -298,7 +293,7 @@ pytest==8.3.4 # pytest-django pytest-cov==6.0.0 # via -r requirements/quality.txt -pytest-django==4.9.0 +pytest-django==4.10.0 # via -r requirements/quality.txt python-slugify==8.0.4 # via @@ -375,7 +370,7 @@ urllib3==2.2.3 # -r requirements/quality.txt # requests # twine -virtualenv==20.29.1 +virtualenv==20.29.2 # via # -r requirements/ci.txt # tox @@ -383,10 +378,6 @@ wheel==0.45.1 # via # -r requirements/pip-tools.txt # pip-tools -wrapt==1.17.2 - # via - # -r requirements/quality.txt - # astroid zipp==3.21.0 # via # -r requirements/quality.txt diff --git a/requirements/doc.txt b/requirements/doc.txt index 974d4100..d4a1dec2 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -47,11 +47,11 @@ code-annotations==2.2.0 # via -r requirements/test.txt colorama==0.4.6 # via sphinx-autobuild -coverage[toml]==7.6.11 +coverage[toml]==7.6.12 # via # -r requirements/test.txt # pytest-cov -cryptography==44.0.0 +cryptography==44.0.1 # via secretstorage ddt==1.7.2 # via -r requirements/test.txt @@ -181,7 +181,7 @@ pygments==2.19.1 # readme-renderer # rich # sphinx -pymongo==4.11 +pymongo==4.11.1 # via # -r requirements/test.txt # edx-opaque-keys @@ -198,7 +198,7 @@ pytest==8.3.4 # pytest-django pytest-cov==6.0.0 # via -r requirements/test.txt -pytest-django==4.9.0 +pytest-django==4.10.0 # via -r requirements/test.txt python-slugify==8.0.4 # via diff --git a/requirements/quality.txt b/requirements/quality.txt index 70f2ad5b..8b205c58 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -8,9 +8,8 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django -astroid==2.15.8 +astroid==3.3.8 # via - # -c requirements/constraints.txt # pylint # pylint-celery attrs==25.1.0 @@ -39,11 +38,11 @@ code-annotations==2.2.0 # via # -r requirements/test.txt # edx-lint -coverage[toml]==7.6.11 +coverage[toml]==7.6.12 # via # -r requirements/test.txt # pytest-cov -cryptography==44.0.0 +cryptography==44.0.1 # via secretstorage ddt==1.7.2 # via -r requirements/test.txt @@ -92,7 +91,7 @@ iniconfig==2.0.0 # via # -r requirements/test.txt # pytest -isort==5.13.2 +isort==6.0.0 # via # -r requirements/quality.in # pylint @@ -112,8 +111,6 @@ jinja2==3.1.5 # code-annotations keyring==25.6.0 # via twine -lazy-object-proxy==1.10.0 - # via astroid markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 @@ -165,7 +162,7 @@ pygments==2.19.1 # via # readme-renderer # rich -pylint==2.17.7 +pylint==3.3.4 # via # edx-lint # pylint-celery @@ -173,13 +170,13 @@ pylint==2.17.7 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via edx-lint pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pymongo==4.11 +pymongo==4.11.1 # via # -r requirements/test.txt # edx-opaque-keys @@ -194,7 +191,7 @@ pytest==8.3.4 # pytest-django pytest-cov==6.0.0 # via -r requirements/test.txt -pytest-django==4.9.0 +pytest-django==4.10.0 # via -r requirements/test.txt python-slugify==8.0.4 # via @@ -253,8 +250,6 @@ urllib3==2.2.3 # -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt # requests # twine -wrapt==1.17.2 - # via astroid zipp==3.21.0 # via importlib-metadata diff --git a/requirements/test.txt b/requirements/test.txt index 84553058..ee5e9916 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -21,7 +21,7 @@ click==8.1.8 # edx-django-utils code-annotations==2.2.0 # via -r requirements/test.in -coverage[toml]==7.6.11 +coverage[toml]==7.6.12 # via pytest-cov ddt==1.7.2 # via -r requirements/test.in @@ -79,7 +79,7 @@ pycparser==2.22 # via # -r requirements/base.txt # cffi -pymongo==4.11 +pymongo==4.11.1 # via # -r requirements/base.txt # edx-opaque-keys @@ -93,7 +93,7 @@ pytest==8.3.4 # pytest-django pytest-cov==6.0.0 # via -r requirements/test.in -pytest-django==4.9.0 +pytest-django==4.10.0 # via -r requirements/test.in python-slugify==8.0.4 # via code-annotations diff --git a/setup.py b/setup.py index 1f527d5d..70fe920e 100644 --- a/setup.py +++ b/setup.py @@ -159,5 +159,6 @@ def is_requirement(line): 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], ) diff --git a/tox.ini b/tox.ini index 47200d8e..9703dc77 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{311}-django{42}, quality, docs +envlist = py{311, 312}-django{42}, quality, docs [doc8] ignore = D001