diff --git a/.github/workflows/add_issues_prs_to_dedalo_project.yml b/.github/workflows/add_issues_prs_to_dedalo_project.yml index baa954fd..16562939 100644 --- a/.github/workflows/add_issues_prs_to_dedalo_project.yml +++ b/.github/workflows/add_issues_prs_to_dedalo_project.yml @@ -11,7 +11,7 @@ jobs: name: Add to project runs-on: ubuntu-latest steps: - - uses: actions/add-to-project@v0.5.0 + - uses: actions/add-to-project@v1.0.1 with: project-url: https://github.com/orgs/eduNEXT/projects/1 github-token: ${{ secrets.DEDALO_PAT }} diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 85484a4b..3d98fd68 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -8,4 +8,4 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v4 + - uses: wagoid/commitlint-github-action@v6 diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index ccad47cd..045d0cd7 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - tutor_version: ["<17.0.0", "<18.0.0"] + tutor_version: ["<17.0.0", "<18.0.0", "<19.0.0"] steps: - - uses: actions/checkout@v4.1.6 + - uses: actions/checkout@v4 with: path: eox-tenant - uses: eduNEXT/integration-test-in-tutor@main diff --git a/.github/workflows/pr_issue_assignment.yml b/.github/workflows/pr_issue_assignment.yml index ed06170c..7704d907 100644 --- a/.github/workflows/pr_issue_assignment.yml +++ b/.github/workflows/pr_issue_assignment.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Auto-assign PR-Issue' - uses: pozil/auto-assign-issue@v1.11.0 + uses: pozil/auto-assign-issue@v2 with: repo-token: ${{ secrets.DEDALO_PAT }} teams: django-plugins-teco diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c1763ec6..b6fbfecd 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -34,7 +34,7 @@ jobs: run: | python -m build --sdist --wheel --outdir dist/ . - name: Publish package - uses: pypa/gh-action-pypi-publish@v1.8.11 + uses: pypa/gh-action-pypi-publish@v1.9.0 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8073790a..5da7e968 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: strategy: max-parallel: 2 matrix: - python-version: ["3.8"] + python-version: ["3.8", "3.10", "3.11"] django: ["32", "42"] steps: - name: Checkout @@ -26,7 +26,7 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4.5.0 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ab25ca..c8f227e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v11.7.0](https://github.com/eduNEXT/eox-tenant/compare/v11.6.0...v11.7.0) - (2024-06-19) + +### Changed + +- **Redwood Support**: Upgrade requirements base on edx-platform redwood + release, update GitHub workflows with new Python (3.10 and 3.11) and actions + version, and update integration test to use new redwood release with Tutor. + ## v11.6.0 - 2024-06-06 ### [11.6.0](https://github.com/eduNEXT/eox-tenant/compare/v11.5.0...v11.6.0) (2024-06-06) diff --git a/README.rst b/README.rst index fa4644f4..7068f538 100644 --- a/README.rst +++ b/README.rst @@ -35,6 +35,8 @@ Compatibility Notes +------------------+-----------------------+ | Quince | >= v11.0.0 | +------------------+-----------------------+ +| Redwood | >= v11.7.0 | ++------------------+-----------------------+ **NOTE**: Since 6.2 version, eox-tenant does not support Django 2.2 @@ -88,7 +90,7 @@ For version >= 3.4 Those settings can be changed in ``eox_tenant/settings/common.py`` or, for example, in ansible configurations. -**NOTE**: the current ``common.py`` works with Open edX juniper version. +**NOTE**: the current ``common.py`` works with Open edX Redwood version. Migration notes --------------- diff --git a/commitlint.config.js b/commitlint.mjs similarity index 100% rename from commitlint.config.js rename to commitlint.mjs diff --git a/eox_tenant/__init__.py b/eox_tenant/__init__.py index a4ad3a9a..4faa7681 100644 --- a/eox_tenant/__init__.py +++ b/eox_tenant/__init__.py @@ -1,4 +1,4 @@ """ Init for eox-tenant. """ -__version__ = '11.6.0' +__version__ = '11.7.0' diff --git a/eox_tenant/edxapp_wrapper/backends/users_l_v1.py b/eox_tenant/edxapp_wrapper/backends/users_l_v1.py deleted file mode 100644 index eab272cf..00000000 --- a/eox_tenant/edxapp_wrapper/backends/users_l_v1.py +++ /dev/null @@ -1,15 +0,0 @@ -"""Lilac backend user module.""" -try: - from common.djangoapps.student.models import UserSignupSource -except ImportError: - UserSignupSource = object - - -def get_user_signup_source(): - """Allow to get the model UserSignupSource from - https://github.com/edx/edx-platform/blob/open-release/lilac.master/common/djangoapps/student/models.py#L849 - - Returns: - UserSignupSource model. - """ - return UserSignupSource diff --git a/eox_tenant/edxapp_wrapper/backends/users_p_v1.py b/eox_tenant/edxapp_wrapper/backends/users_p_v1.py new file mode 100644 index 00000000..95192fc2 --- /dev/null +++ b/eox_tenant/edxapp_wrapper/backends/users_p_v1.py @@ -0,0 +1,12 @@ +"""Palm backend user module.""" +from common.djangoapps.student.models.user import UserSignupSource # pylint: disable=import-error + + +def get_user_signup_source(): + """Allow to get the model UserSignupSource from + https://github.com/openedx/edx-platform/blob/open-release/palm.master/common/djangoapps/student/models/user.py#L820 + + Returns: + UserSignupSource model. + """ + return UserSignupSource diff --git a/eox_tenant/settings/common.py b/eox_tenant/settings/common.py index 6d849eb5..8db7f571 100644 --- a/eox_tenant/settings/common.py +++ b/eox_tenant/settings/common.py @@ -42,7 +42,7 @@ def plugin_settings(settings): settings.GET_SITE_CONFIGURATION_MODULE = 'eox_tenant.edxapp_wrapper.backends.site_configuration_module_i_v1' settings.GET_THEMING_HELPERS = 'eox_tenant.edxapp_wrapper.backends.theming_helpers_h_v1' settings.EOX_TENANT_EDX_AUTH_BACKEND = "eox_tenant.edxapp_wrapper.backends.edx_auth_n_v1" - settings.EOX_TENANT_USERS_BACKEND = 'eox_tenant.edxapp_wrapper.backends.users_l_v1' + settings.EOX_TENANT_USERS_BACKEND = 'eox_tenant.edxapp_wrapper.backends.users_p_v1' settings.EOX_TENANT_BEARER_AUTHENTICATION = 'eox_tenant.edxapp_wrapper.backends.bearer_authentication_l_v1' settings.EOX_MAX_CONFIG_OVERRIDE_SECONDS = 300 settings.EDXMAKO_MODULE_BACKEND = 'eox_tenant.edxapp_wrapper.backends.edxmako_l_v1' diff --git a/eox_tenant/test/tutor/integration_test_tutor.py b/eox_tenant/test/tutor/integration_test_tutor.py index 0829f731..33e322d4 100644 --- a/eox_tenant/test/tutor/integration_test_tutor.py +++ b/eox_tenant/test/tutor/integration_test_tutor.py @@ -18,7 +18,7 @@ def test_current_settings_code_imports(self): import eox_tenant.edxapp_wrapper.backends.branding_api_l_v1 # isort:skip import eox_tenant.edxapp_wrapper.backends.site_configuration_module_i_v1 # isort:skip import eox_tenant.edxapp_wrapper.backends.theming_helpers_h_v1 # isort:skip - import eox_tenant.edxapp_wrapper.backends.users_l_v1 # isort:skip + import eox_tenant.edxapp_wrapper.backends.users_p_v1 # isort:skip import eox_tenant.edxapp_wrapper.backends.bearer_authentication_l_v1 # isort:skip import eox_tenant.edxapp_wrapper.backends.edxmako_l_v1 # isort:skip import eox_tenant.edxapp_wrapper.backends.edx_auth_n_v1 # isort:skip diff --git a/requirements/base.txt b/requirements/base.txt index 7b2b7d2c..c842eeff 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,8 +6,9 @@ # asgiref==3.8.1 # via django -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # django # djangorestframework certifi==2024.6.2 @@ -50,7 +51,7 @@ django-crum==0.7.9 # edx-django-utils django-model-utils==4.5.1 # via edx-organizations -django-mysql==4.13.0 +django-mysql==4.14.0 # via -r requirements/base.in django-simple-history==3.0.0 # via @@ -62,6 +63,7 @@ django-waffle==4.1.0 # edx-drf-extensions djangorestframework==3.15.1 # via + # -c requirements/constraints.txt # -r requirements/base.in # drf-jwt # edx-drf-extensions @@ -76,7 +78,7 @@ edx-drf-extensions==10.3.0 # via # -r requirements/base.in # edx-organizations -edx-opaque-keys[django]==2.9.0 +edx-opaque-keys[django]==2.10.0 # via # -r requirements/base.in # edx-drf-extensions @@ -87,19 +89,19 @@ idna==3.7 # via requests jsonfield==3.1.0 # via -r requirements/base.in -newrelic==9.10.0 +newrelic==9.11.0 # via edx-django-utils oauthlib==3.2.2 # via # requests-oauthlib # social-auth-core -openedx-filters==1.8.1 +openedx-filters==1.9.0 # via -r requirements/base.in pbr==6.0.0 # via stevedore pillow==10.3.0 # via edx-organizations -psutil==5.9.8 +psutil==6.0.0 # via edx-django-utils pycparser==2.22 # via cffi @@ -108,7 +110,7 @@ pyjwt[crypto]==2.8.0 # drf-jwt # edx-drf-extensions # social-auth-core -pymongo==4.4.0 +pymongo==4.7.3 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils @@ -133,11 +135,11 @@ stevedore==5.2.0 # via # edx-django-utils # edx-opaque-keys -typing-extensions==4.12.1 +typing-extensions==4.12.2 # via # asgiref # edx-opaque-keys -urllib3==2.2.1 +urllib3==2.2.2 # via requests # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 3a9696a9..c711b6c5 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -12,3 +12,10 @@ Django<5 # Common constraints for Open edX repos -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt + +# backports.zoneinfo is only needed for Python < 3.9 +backports.zoneinfo; python_version<'3.9' + +# Adding pin to avoid any major upgrade. +# 3.15.1 is the latest version that works with Django 3.2 +djangorestframework<3.15.2 diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index fd530e4a..69e02c90 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -12,7 +12,7 @@ importlib-metadata==6.11.0 # via # -c https://raw.githubusercontent.com/openedx/edx-lint/master/edx_lint/files/common_constraints.txt # build -packaging==24.0 +packaging==24.1 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in diff --git a/requirements/test.txt b/requirements/test.txt index 214ac120..e07ac4e1 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -10,8 +10,9 @@ asgiref==3.8.1 # django astroid==3.2.2 # via pylint -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # django # djangorestframework @@ -73,7 +74,7 @@ django-model-utils==4.5.1 # via # -r requirements/base.txt # edx-organizations -django-mysql==4.13.0 +django-mysql==4.14.0 # via -r requirements/base.txt django-simple-history==3.0.0 # via @@ -87,6 +88,7 @@ django-waffle==4.1.0 # edx-drf-extensions djangorestframework==3.15.1 # via + # -c requirements/constraints.txt # -r requirements/base.txt # drf-jwt # edx-drf-extensions @@ -107,7 +109,7 @@ edx-drf-extensions==10.3.0 # via # -r requirements/base.txt # edx-organizations -edx-opaque-keys[django]==2.9.0 +edx-opaque-keys[django]==2.10.0 # via # -r requirements/base.txt # edx-drf-extensions @@ -126,7 +128,7 @@ mccabe==0.7.0 # via pylint mock==5.1.0 # via -r requirements/test.in -newrelic==9.10.0 +newrelic==9.11.0 # via # -r requirements/base.txt # edx-django-utils @@ -135,7 +137,7 @@ oauthlib==3.2.2 # -r requirements/base.txt # requests-oauthlib # social-auth-core -openedx-filters==1.8.1 +openedx-filters==1.9.0 # via -r requirements/base.txt path==16.14.0 # via path-py @@ -151,11 +153,11 @@ pillow==10.3.0 # edx-organizations platformdirs==4.2.2 # via pylint -psutil==5.9.8 +psutil==6.0.0 # via # -r requirements/base.txt # edx-django-utils -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via -r requirements/test.in pycparser==2.22 # via @@ -167,9 +169,9 @@ pyjwt[crypto]==2.8.0 # drf-jwt # edx-drf-extensions # social-auth-core -pylint==3.2.2 +pylint==3.2.3 # via -r requirements/test.in -pymongo==4.4.0 +pymongo==4.7.3 # via # -r requirements/base.txt # edx-opaque-keys @@ -210,20 +212,20 @@ stevedore==5.2.0 # -r requirements/base.txt # edx-django-utils # edx-opaque-keys -testfixtures==8.2.0 +testfixtures==8.3.0 # via -r requirements/test.in tomli==2.0.1 # via pylint tomlkit==0.12.5 # via pylint -typing-extensions==4.12.1 +typing-extensions==4.12.2 # via # -r requirements/base.txt # asgiref # astroid # edx-opaque-keys # pylint -urllib3==2.2.1 +urllib3==2.2.2 # via # -r requirements/base.txt # requests diff --git a/requirements/tox.txt b/requirements/tox.txt index b38db655..4721f999 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.14.0 +filelock==3.15.3 # via # tox # virtualenv -packaging==24.0 +packaging==24.1 # via # pyproject-api # tox @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.15.0 +tox==4.15.1 # via -r requirements/tox.in virtualenv==20.26.2 # via tox diff --git a/setup.cfg b/setup.cfg index bb8faa5a..75b003ba 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.6.0 +current_version = 11.7.0 commit = False tag = False diff --git a/setup.py b/setup.py index 7c009de2..9bb40f91 100644 --- a/setup.py +++ b/setup.py @@ -41,12 +41,15 @@ def get_version(): 'Development Status :: 5 - Production/Stable', 'Framework :: Django :: 2.2', 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', ], license='AGPL', zip_safe=False, diff --git a/tox.ini b/tox.ini index 69893ecf..820c3f72 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,13 @@ [tox] -envlist = py{38}-django{32,42} +envlist = py{38, 310, 311}-django{32,42} [testenv] envdir= # Use the same environment for all commands running under a specific python version py38: {toxworkdir}/py38 + py310: {toxworkdir}/py310 + py311: {toxworkdir}/py311 deps = django32: -r requirements/django32.txt