From 675da4382905b82f38d6e0472eec937c488a87c4 Mon Sep 17 00:00:00 2001 From: Irtaza Akram Date: Wed, 28 Aug 2024 11:07:24 +0500 Subject: [PATCH] fix: unpin sphinx constraint & drop python 3.8 support --- .github/workflows/ci.yml | 4 +-- .github/workflows/publish_pypi.yml | 2 +- .gitignore | 2 ++ .readthedocs.yaml | 2 +- .../event_transformers/navigation_events.py | 10 +++---- requirements/base.txt | 1 - requirements/constraints.txt | 16 ---------- requirements/dev.txt | 18 ++---------- requirements/doc.txt | 29 +++++-------------- requirements/quality.txt | 1 - requirements/test.txt | 1 - setup.py | 3 +- tox.ini | 2 +- 13 files changed, 23 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8d4d585..8d873560 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ 'ubuntu-20.04' ] - python-version: ['3.8', '3.11', '3.12'] + python-version: ['3.11', '3.12'] toxenv: [ 'django42' ] # Only run these other workflows on the latest python version we support. include: @@ -48,7 +48,7 @@ jobs: run: tox - name: Run Coverage - if: matrix.python-version == '3.8' && matrix.toxenv=='django42' + if: matrix.python-version == '3.11' && matrix.toxenv=='django42' uses: codecov/codecov-action@v4 with: flags: unittests diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index a47eb5a3..968584c5 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -16,7 +16,7 @@ jobs: - name: setup python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/.gitignore b/.gitignore index 2b53fdcb..ad0a2e06 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,5 @@ requirements/private.txt .idea test_output/ +env/ +.python-version \ No newline at end of file diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 363472a3..790103ad 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,7 +13,7 @@ sphinx: build: os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.11" python: install: diff --git a/event_routing_backends/processors/xapi/event_transformers/navigation_events.py b/event_routing_backends/processors/xapi/event_transformers/navigation_events.py index 731d2ec9..d0460041 100644 --- a/event_routing_backends/processors/xapi/event_transformers/navigation_events.py +++ b/event_routing_backends/processors/xapi/event_transformers/navigation_events.py @@ -67,8 +67,8 @@ def get_object(self): ) -@ XApiTransformersRegistry.register('edx.ui.lms.sequence.outline.selected') -@ XApiTransformersRegistry.register('edx.ui.lms.outline.selected') +@XApiTransformersRegistry.register('edx.ui.lms.sequence.outline.selected') +@XApiTransformersRegistry.register('edx.ui.lms.outline.selected') class OutlineSelectedTransformer(NavigationTransformersMixin): """ xAPI transformer for Navigation events. @@ -91,9 +91,9 @@ def get_object(self): ) -@ XApiTransformersRegistry.register('edx.ui.lms.sequence.next_selected') -@ XApiTransformersRegistry.register('edx.ui.lms.sequence.previous_selected') -@ XApiTransformersRegistry.register('edx.ui.lms.sequence.tab_selected') +@XApiTransformersRegistry.register('edx.ui.lms.sequence.next_selected') +@XApiTransformersRegistry.register('edx.ui.lms.sequence.previous_selected') +@XApiTransformersRegistry.register('edx.ui.lms.sequence.tab_selected') class TabNavigationTransformer(NavigationTransformersMixin): """ xAPI transformer for Navigation events. diff --git a/requirements/base.txt b/requirements/base.txt index eb65137c..d3dca529 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -103,7 +103,6 @@ edx-toggles==5.2.0 event-tracking==2.4.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -c requirements/constraints.txt # -r requirements/base.in fastavro==1.9.5 # via openedx-events diff --git a/requirements/constraints.txt b/requirements/constraints.txt index c072cd86..d91704bb 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,19 +10,3 @@ # Common constraints for edx repos -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - -# diff-cover latest requires (pluggy>=0.13.1,<0.14.0) -# which conflicts with pytest(pluggy>=0.12,<2.0.0) and tox(pluggy>0.12) both of these fetch pluggy==1.0.0 -# but diff-cover latest has a pin (pluggy<1.0.0a1) -# Using the same version of diff-cover which is being used currently in edx-platform to avoid this conflict. -diff-cover==4.0.0 - -# greater version failing docs build -sphinx==4.2.0 -# Sphinx requires docutils<0.18 && doc8<1.0.0 -# This pin can be removed once sphinx constraint is removed. -docutils<0.18 -doc8<1.0.0 -event-tracking>=2.3.2 -# it is not availablein python3.9 -backports.zoneinfo;python_version<"3.9" diff --git a/requirements/dev.txt b/requirements/dev.txt index 8a737d05..b7df87ba 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -56,6 +56,7 @@ cffi==1.17.0 chardet==5.2.0 # via # -r requirements/ci.txt + # diff-cover # tox charset-normalizer==3.3.2 # via @@ -109,10 +110,8 @@ cryptography==43.0.0 # django-fernet-fields-v2 ddt==1.7.2 # via -r requirements/quality.txt -diff-cover==4.0.0 - # via - # -c requirements/constraints.txt - # -r requirements/dev.in +diff-cover==9.1.1 + # via -r requirements/dev.in dill==0.3.8 # via # -r requirements/quality.txt @@ -193,7 +192,6 @@ edx-toggles==5.2.0 event-tracking==2.4.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -c requirements/constraints.txt # -r requirements/quality.txt factory-boy==3.3.1 # via -r requirements/quality.txt @@ -216,8 +214,6 @@ idna==3.8 # via # -r requirements/quality.txt # requests -inflect==7.3.1 - # via jinja2-pluralize iniconfig==2.0.0 # via # -r requirements/quality.txt @@ -233,9 +229,6 @@ jinja2==3.1.4 # -r requirements/quality.txt # code-annotations # diff-cover - # jinja2-pluralize -jinja2-pluralize==0.3.0 - # via diff-cover jsonfield==3.1.0 # via # -r requirements/quality.txt @@ -256,8 +249,6 @@ mccabe==0.7.0 # pylint mock==5.1.0 # via -r requirements/quality.txt -more-itertools==10.4.0 - # via inflect newrelic==9.13.0 # via # -r requirements/quality.txt @@ -427,13 +418,10 @@ tomlkit==0.13.2 # pylint tox==4.18.0 # via -r requirements/ci.txt -typeguard==4.3.0 - # via inflect typing-extensions==4.12.2 # via # -r requirements/quality.txt # edx-opaque-keys - # typeguard tzdata==2024.1 # via # -r requirements/quality.txt diff --git a/requirements/doc.txt b/requirements/doc.txt index 73f7e134..e978f665 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -6,7 +6,7 @@ # accessible-pygments==0.0.5 # via pydata-sphinx-theme -alabaster==0.7.16 +alabaster==1.0.0 # via sphinx amqp==5.2.0 # via @@ -91,7 +91,6 @@ cryptography==43.0.0 # via # -r requirements/test.txt # django-fernet-fields-v2 - # secretstorage ddt==1.7.2 # via -r requirements/test.txt django==4.2.15 @@ -136,13 +135,10 @@ djangorestframework==3.15.2 # via # -r requirements/test.txt # django-config-models -doc8==0.11.2 - # via - # -c requirements/constraints.txt - # -r requirements/doc.in -docutils==0.17.1 +doc8==1.1.1 + # via -r requirements/doc.in +docutils==0.20.1 # via - # -c requirements/constraints.txt # doc8 # pydata-sphinx-theme # readme-renderer @@ -173,7 +169,6 @@ edx-toggles==5.2.0 event-tracking==2.4.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -c requirements/constraints.txt # -r requirements/test.txt factory-boy==3.3.1 # via -r requirements/test.txt @@ -209,10 +204,6 @@ jaraco-context==6.0.1 # via keyring jaraco-functools==4.0.2 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.4 # via # -r requirements/test.txt @@ -283,7 +274,7 @@ pycparser==2.22 # via # -r requirements/test.txt # cffi -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.15.4 # via sphinx-book-theme pygments==2.18.0 # via @@ -352,8 +343,6 @@ rfc3986==2.0.0 # via twine rich==13.8.0 # via twine -secretstorage==3.3.3 - # via keyring six==1.16.0 # via # -r requirements/test.txt @@ -365,13 +354,12 @@ snowballstemmer==2.2.0 # via sphinx soupsieve==2.6 # via beautifulsoup4 -sphinx==4.2.0 +sphinx==8.0.2 # via - # -c requirements/constraints.txt # -r requirements/doc.in # pydata-sphinx-theme # sphinx-book-theme -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.3 # via -r requirements/doc.in sphinxcontrib-applehelp==2.0.0 # via sphinx @@ -430,6 +418,3 @@ wcwidth==0.2.13 # prompt-toolkit zipp==3.20.1 # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/quality.txt b/requirements/quality.txt index 333f2781..18a3868e 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -159,7 +159,6 @@ edx-toggles==5.2.0 event-tracking==2.4.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -c requirements/constraints.txt # -r requirements/test.txt factory-boy==3.3.1 # via -r requirements/test.txt diff --git a/requirements/test.txt b/requirements/test.txt index a50fda35..221217cf 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -144,7 +144,6 @@ edx-toggles==5.2.0 event-tracking==2.4.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -c requirements/constraints.txt # -r requirements/base.txt factory-boy==3.3.1 # via -r requirements/test.in diff --git a/setup.py b/setup.py index b04c07bc..4f068d2c 100644 --- a/setup.py +++ b/setup.py @@ -148,7 +148,7 @@ def is_requirement(line): ], include_package_data=True, install_requires=load_requirements('requirements/base.in'), - python_requires=">=3.8", + python_requires=">=3.11", license="AGPL 3.0", zip_safe=False, keywords='Python edx', @@ -160,7 +160,6 @@ def is_requirement(line): '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', ], diff --git a/tox.ini b/tox.ini index 40d90f26..1903935c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38,311,312}-django{42}, quality, docs, pii_check +envlist = py{311,312}-django{42}, quality, docs, pii_check [doc8] ignore = D001