From 0f280ed03d25dd8415af9d3a72006fc254af392c Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Fri, 5 Apr 2024 17:03:40 +0500 Subject: [PATCH 1/4] feat: add Python 3.12 support, drop Django 3.8 Co-authored-by: Agrendalath --- .github/workflows/ci.yml | 4 +- requirements/base.txt | 34 +++++++++-------- requirements/ci.txt | 10 ++--- requirements/constraints.txt | 3 ++ requirements/dev.txt | 73 +++++++++++++++++++----------------- requirements/pip-tools.txt | 16 ++++---- requirements/pip.txt | 4 +- requirements/quality.txt | 54 ++++++++++++++------------ requirements/test.txt | 50 ++++++++++++------------ setup.py | 2 +- tox.ini | 12 +----- 11 files changed, 136 insertions(+), 126 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17fc6d68c..5d40d9519 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04] - python-version: [3.8] - toxenv: [py38-django32, py38-django42, quality, translations-django32, translations-django42] + python-version: [3.8, 3.12] + toxenv: [django42, quality, translations-django42] steps: - name: checkout repo diff --git a/requirements/base.txt b/requirements/base.txt index 62a6ed0f6..0b06c2da9 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,17 +6,21 @@ # appdirs==1.4.4 # via fs -asgiref==3.7.2 +asgiref==3.8.1 # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django bleach[css]==6.1.0 # via -r requirements/base.in -boto3==1.34.49 +boto3==1.34.85 # via fs-s3fs -botocore==1.34.49 +botocore==1.34.85 # via # boto3 # s3transfer -django==3.2.24 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # django-appconf @@ -39,27 +43,25 @@ jmespath==1.0.1 # botocore lazy==1.6 # via xblock -lxml==5.1.0 +lxml==5.2.1 # via xblock -mako==1.3.2 +mako==1.3.3 # via xblock markupsafe==2.1.5 # via # mako # xblock -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via xblock -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # botocore # xblock pytz==2024.1 - # via - # django - # xblock + # via xblock pyyaml==6.0.1 # via xblock -s3transfer==0.10.0 +s3transfer==0.10.1 # via boto3 simplejson==3.19.2 # via xblock @@ -69,15 +71,15 @@ six==1.16.0 # fs # fs-s3fs # python-dateutil -sqlparse==0.4.4 +sqlparse==0.5.0 # via django tinycss2==1.2.1 # via bleach -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via asgiref urllib3==1.26.18 # via botocore -web-fragments==2.1.0 +web-fragments==2.2.0 # via xblock webencodings==0.5.1 # via @@ -85,7 +87,7 @@ webencodings==0.5.1 # tinycss2 webob==1.8.7 # via xblock -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/ci.txt b/requirements/ci.txt index e7a876093..ed7cff4c7 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.3.2 +cachetools==5.3.3 # via tox chardet==5.2.0 # via tox @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.13.4 # via # tox # virtualenv -packaging==23.2 +packaging==24.0 # via # pyproject-api # tox @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/ci.in -virtualenv==20.25.1 +virtualenv==20.25.2 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 289e45347..84a58bca5 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -12,3 +12,6 @@ -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt pylint==2.4.2 + +# For python greater than or equal to 3.9 backports.zoneinfo causing failures +backports.zoneinfo; python_version<"3.9" diff --git a/requirements/dev.txt b/requirements/dev.txt index 90445782a..78f07a9d7 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -12,7 +12,7 @@ arrow==1.3.0 # via # -r requirements/quality.txt # cookiecutter -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/quality.txt # django @@ -21,26 +21,31 @@ astroid==2.3.3 # -r requirements/quality.txt # pylint # pylint-celery +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/quality.txt + # django binaryornot==0.4.4 # via # -r requirements/quality.txt # cookiecutter bleach[css]==6.1.0 # via -r requirements/quality.txt -boto3==1.34.49 +boto3==1.34.85 # via # -r requirements/quality.txt # fs-s3fs -botocore==1.34.49 +botocore==1.34.85 # via # -r requirements/quality.txt # boto3 # s3transfer -build==1.0.3 +build==1.2.1 # via # -r requirements/pip-tools.txt # pip-tools -cachetools==5.3.2 +cachetools==5.3.3 # via # -r requirements/ci.txt # tox @@ -71,7 +76,7 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==1.6.0 +code-annotations==1.8.0 # via # -r requirements/quality.txt # edx-lint @@ -83,17 +88,17 @@ cookiecutter==2.6.0 # via # -r requirements/quality.txt # xblock-sdk -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/quality.txt # pytest-cov -ddt==1.7.1 +ddt==1.7.2 # via -r requirements/quality.txt distlib==0.3.8 # via # -r requirements/ci.txt # virtualenv -django==3.2.24 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt @@ -108,7 +113,7 @@ django-appconf==1.0.6 # django-statici18n django-statici18n==2.4.0 # via -r requirements/quality.txt -edx-i18n-tools==1.3.0 +edx-i18n-tools==1.5.0 # via -r requirements/quality.txt edx-lint==5.3.6 # via -r requirements/quality.txt @@ -116,7 +121,7 @@ exceptiongroup==1.2.0 # via # -r requirements/quality.txt # pytest -filelock==3.13.1 +filelock==3.13.4 # via # -r requirements/ci.txt # tox @@ -132,12 +137,13 @@ fs-s3fs==1.1.1 # -r requirements/quality.txt # openedx-django-pyfs # xblock-sdk -idna==3.6 +idna==3.7 # via # -r requirements/quality.txt # requests -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/pip-tools.txt # build iniconfig==2.0.0 @@ -166,13 +172,13 @@ lazy-object-proxy==1.4.3 # via # -r requirements/quality.txt # astroid -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/quality.txt # edx-i18n-tools # xblock # xblock-sdk -mako==1.3.2 +mako==1.3.3 # via # -r requirements/quality.txt # xblock @@ -196,11 +202,11 @@ mdurl==0.1.2 # markdown-it-py mock==5.1.0 # via -r requirements/quality.txt -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via # -r requirements/quality.txt # xblock -packaging==23.2 +packaging==24.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -209,7 +215,7 @@ packaging==23.2 # pyproject-api # pytest # tox -path==16.10.0 +path==16.14.0 # via # -r requirements/quality.txt # edx-i18n-tools @@ -217,7 +223,7 @@ pbr==6.0.0 # via # -r requirements/quality.txt # stevedore -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.txt platformdirs==4.2.0 # via @@ -274,16 +280,16 @@ pyproject-hooks==1.0.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.0.2 +pytest==8.1.1 # via # -r requirements/quality.txt # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/quality.txt pytest-django==4.8.0 # via -r requirements/quality.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/quality.txt # arrow @@ -297,7 +303,6 @@ python-slugify==8.0.4 pytz==2024.1 # via # -r requirements/quality.txt - # django # xblock pyyaml==6.0.1 # via @@ -311,11 +316,11 @@ requests==2.31.0 # -r requirements/quality.txt # cookiecutter # xblock-sdk -rich==13.7.0 +rich==13.7.1 # via # -r requirements/quality.txt # cookiecutter -s3transfer==0.10.0 +s3transfer==0.10.1 # via # -r requirements/quality.txt # boto3 @@ -333,7 +338,7 @@ six==1.16.0 # fs # fs-s3fs # python-dateutil -sqlparse==0.4.4 +sqlparse==0.5.0 # via # -r requirements/quality.txt # django @@ -361,13 +366,13 @@ tomli==2.0.1 # pyproject-hooks # pytest # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/ci.txt -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via # -r requirements/quality.txt # arrow -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via # -r requirements/quality.txt # asgiref @@ -377,11 +382,11 @@ urllib3==1.26.18 # -r requirements/quality.txt # botocore # requests -virtualenv==20.25.1 +virtualenv==20.25.2 # via # -r requirements/ci.txt # tox -web-fragments==2.1.0 +web-fragments==2.2.0 # via # -r requirements/quality.txt # xblock @@ -396,7 +401,7 @@ webob==1.8.7 # -r requirements/quality.txt # xblock # xblock-sdk -wheel==0.42.0 +wheel==0.43.0 # via # -r requirements/pip-tools.txt # pip-tools @@ -404,13 +409,13 @@ wrapt==1.11.2 # via # -r requirements/quality.txt # astroid -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via # -r requirements/quality.txt # xblock-sdk xblock-sdk==0.7.0 # via -r requirements/quality.txt -zipp==3.17.0 +zipp==3.18.1 # via # -r requirements/pip-tools.txt # importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 44c48d996..748bf44e6 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,15 +4,17 @@ # # make upgrade # -build==1.0.3 +build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.0.1 - # via build -packaging==23.2 +importlib-metadata==6.11.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # build +packaging==24.0 # via build -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via @@ -23,9 +25,9 @@ tomli==2.0.1 # build # pip-tools # pyproject-hooks -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.18.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 66656035b..e3ffcc7b6 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.42.0 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.1.1 +setuptools==69.5.1 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 6a8d97eee..2be1417a0 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -12,7 +12,7 @@ arrow==1.3.0 # via # -r requirements/test.txt # cookiecutter -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/test.txt # django @@ -20,17 +20,22 @@ astroid==2.3.3 # via # pylint # pylint-celery +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/test.txt + # django binaryornot==0.4.4 # via # -r requirements/test.txt # cookiecutter bleach[css]==6.1.0 # via -r requirements/test.txt -boto3==1.34.49 +boto3==1.34.85 # via # -r requirements/test.txt # fs-s3fs -botocore==1.34.49 +botocore==1.34.85 # via # -r requirements/test.txt # boto3 @@ -56,19 +61,19 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.8.0 # via edx-lint cookiecutter==2.6.0 # via # -r requirements/test.txt # xblock-sdk -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/test.txt # pytest-cov -ddt==1.7.1 +ddt==1.7.2 # via -r requirements/test.txt -django==3.2.24 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt @@ -83,7 +88,7 @@ django-appconf==1.0.6 # django-statici18n django-statici18n==2.4.0 # via -r requirements/test.txt -edx-i18n-tools==1.3.0 +edx-i18n-tools==1.5.0 # via -r requirements/test.txt edx-lint==5.3.6 # via -r requirements/quality.in @@ -102,7 +107,7 @@ fs-s3fs==1.1.1 # -r requirements/test.txt # openedx-django-pyfs # xblock-sdk -idna==3.6 +idna==3.7 # via # -r requirements/test.txt # requests @@ -128,13 +133,13 @@ lazy==1.6 # xblock lazy-object-proxy==1.4.3 # via astroid -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/test.txt # edx-i18n-tools # xblock # xblock-sdk -mako==1.3.2 +mako==1.3.3 # via # -r requirements/test.txt # xblock @@ -156,15 +161,15 @@ mdurl==0.1.2 # markdown-it-py mock==5.1.0 # via -r requirements/test.txt -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via # -r requirements/test.txt # xblock -packaging==23.2 +packaging==24.0 # via # -r requirements/test.txt # pytest -path==16.10.0 +path==16.14.0 # via # -r requirements/test.txt # edx-i18n-tools @@ -203,16 +208,16 @@ pypng==0.20220715.0 # via # -r requirements/test.txt # xblock-sdk -pytest==8.0.2 +pytest==8.1.1 # via # -r requirements/test.txt # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.txt pytest-django==4.8.0 # via -r requirements/test.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/test.txt # arrow @@ -226,7 +231,6 @@ python-slugify==8.0.4 pytz==2024.1 # via # -r requirements/test.txt - # django # xblock pyyaml==6.0.1 # via @@ -240,11 +244,11 @@ requests==2.31.0 # -r requirements/test.txt # cookiecutter # xblock-sdk -rich==13.7.0 +rich==13.7.1 # via # -r requirements/test.txt # cookiecutter -s3transfer==0.10.0 +s3transfer==0.10.1 # via # -r requirements/test.txt # boto3 @@ -262,7 +266,7 @@ six==1.16.0 # fs # fs-s3fs # python-dateutil -sqlparse==0.4.4 +sqlparse==0.5.0 # via # -r requirements/test.txt # django @@ -281,11 +285,11 @@ tomli==2.0.1 # -r requirements/test.txt # coverage # pytest -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via # -r requirements/test.txt # arrow -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via # -r requirements/test.txt # asgiref @@ -295,7 +299,7 @@ urllib3==1.26.18 # -r requirements/test.txt # botocore # requests -web-fragments==2.1.0 +web-fragments==2.2.0 # via # -r requirements/test.txt # xblock @@ -312,7 +316,7 @@ webob==1.8.7 # xblock-sdk wrapt==1.11.2 # via astroid -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via # -r requirements/test.txt # xblock-sdk diff --git a/requirements/test.txt b/requirements/test.txt index 2c6a0b980..8b86e100b 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -10,19 +10,24 @@ appdirs==1.4.4 # fs arrow==1.3.0 # via cookiecutter -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # django binaryornot==0.4.4 # via cookiecutter bleach[css]==6.1.0 # via -r requirements/base.txt -boto3==1.34.49 +boto3==1.34.85 # via # -r requirements/base.txt # fs-s3fs -botocore==1.34.49 +botocore==1.34.85 # via # -r requirements/base.txt # boto3 @@ -37,9 +42,9 @@ click==8.1.7 # via cookiecutter cookiecutter==2.6.0 # via xblock-sdk -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via pytest-cov -ddt==1.7.1 +ddt==1.7.2 # via -r requirements/test.in # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt @@ -55,7 +60,7 @@ django-appconf==1.0.6 # django-statici18n django-statici18n==2.4.0 # via -r requirements/base.txt -edx-i18n-tools==1.3.0 +edx-i18n-tools==1.5.0 # via -r requirements/test.in exceptiongroup==1.2.0 # via pytest @@ -70,7 +75,7 @@ fs-s3fs==1.1.1 # -r requirements/base.txt # openedx-django-pyfs # xblock-sdk -idna==3.6 +idna==3.7 # via requests iniconfig==2.0.0 # via pytest @@ -85,13 +90,13 @@ lazy==1.6 # via # -r requirements/base.txt # xblock -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/base.txt # edx-i18n-tools # xblock # xblock-sdk -mako==1.3.2 +mako==1.3.3 # via # -r requirements/base.txt # xblock @@ -107,14 +112,14 @@ mdurl==0.1.2 # via markdown-it-py mock==5.1.0 # via -r requirements/test.in -openedx-django-pyfs==3.5.0 +openedx-django-pyfs==3.6.0 # via # -r requirements/base.txt # -r requirements/test.in # xblock -packaging==23.2 +packaging==24.0 # via pytest -path==16.10.0 +path==16.14.0 # via edx-i18n-tools pluggy==1.4.0 # via pytest @@ -124,15 +129,15 @@ pygments==2.17.2 # via rich pypng==0.20220715.0 # via xblock-sdk -pytest==8.0.2 +pytest==8.1.1 # via # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.in pytest-django==4.8.0 # via -r requirements/test.in -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/base.txt # arrow @@ -143,7 +148,6 @@ python-slugify==8.0.4 pytz==2024.1 # via # -r requirements/base.txt - # django # xblock pyyaml==6.0.1 # via @@ -155,9 +159,9 @@ requests==2.31.0 # via # cookiecutter # xblock-sdk -rich==13.7.0 +rich==13.7.1 # via cookiecutter -s3transfer==0.10.0 +s3transfer==0.10.1 # via # -r requirements/base.txt # boto3 @@ -173,7 +177,7 @@ six==1.16.0 # fs # fs-s3fs # python-dateutil -sqlparse==0.4.4 +sqlparse==0.5.0 # via # -r requirements/base.txt # django @@ -187,9 +191,9 @@ tomli==2.0.1 # via # coverage # pytest -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via arrow -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via # -r requirements/base.txt # asgiref @@ -199,7 +203,7 @@ urllib3==1.26.18 # -r requirements/base.txt # botocore # requests -web-fragments==2.1.0 +web-fragments==2.2.0 # via # -r requirements/base.txt # xblock @@ -214,7 +218,7 @@ webob==1.8.7 # -r requirements/base.txt # xblock # xblock-sdk -xblock[django]==1.10.0 +xblock[django]==3.1.0 # via # -r requirements/base.txt # xblock-sdk diff --git a/setup.py b/setup.py index c4ea4b4ed..0a8aa5ad2 100644 --- a/setup.py +++ b/setup.py @@ -118,8 +118,8 @@ def package_data(pkg, root_list): classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.12', 'Framework :: Django', - 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.2', ], url='https://github.com/openedx/xblock-drag-and-drop-v2', diff --git a/tox.ini b/tox.ini index 87c416a16..06ed9963e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,42},quality,translations-django{32,42} +envlist = py{38, 312}-django{42},quality,translations-django{42} [pycodestyle] exclude = .git,.tox @@ -20,7 +20,6 @@ allowlist_externals = make mkdir deps = - django32: Django>=3.2,<4.0 django42: Django>=4.2,<4.3 -r{toxinidir}/requirements/test.txt commands = @@ -35,15 +34,6 @@ commands = pylint drag_and_drop_v2 pylint tests --rcfile=tests/pylintrc -[testenv:translations-django32] -allowlist_externals = - make -deps = - Django>=3.2,<4.0 - -r{toxinidir}/requirements/test.txt -commands = - make check_translations_up_to_date - [testenv:translations-django42] allowlist_externals = make From 78e413543c2cf5b521914be5b7e2942244d5f5a4 Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Wed, 17 Apr 2024 15:25:28 +0200 Subject: [PATCH 2/4] test: update `xblock-sdk` to support `XBlock>=2.0` --- requirements/base.txt | 6 ++++-- requirements/constraints.txt | 3 +++ requirements/dev.txt | 5 +++-- requirements/quality.txt | 5 +++-- requirements/test.in | 2 +- requirements/test.txt | 5 +++-- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 0b06c2da9..48a786c4b 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -43,8 +43,10 @@ jmespath==1.0.1 # botocore lazy==1.6 # via xblock -lxml==5.2.1 - # via xblock +lxml==4.9.4 + # via + # -c requirements/constraints.txt + # xblock mako==1.3.3 # via xblock markupsafe==2.1.5 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 84a58bca5..1819adbae 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -15,3 +15,6 @@ pylint==2.4.2 # For python greater than or equal to 3.9 backports.zoneinfo causing failures backports.zoneinfo; python_version<"3.9" + +# https://github.com/openedx/xblock-sdk/issues/347 +lxml<5.0.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 78f07a9d7..36565d6c3 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -172,8 +172,9 @@ lazy-object-proxy==1.4.3 # via # -r requirements/quality.txt # astroid -lxml==5.2.1 +lxml==4.9.4 # via + # -c requirements/constraints.txt # -r requirements/quality.txt # edx-i18n-tools # xblock @@ -413,7 +414,7 @@ xblock[django]==3.1.0 # via # -r requirements/quality.txt # xblock-sdk -xblock-sdk==0.7.0 +xblock-sdk==0.10.0 # via -r requirements/quality.txt zipp==3.18.1 # via diff --git a/requirements/quality.txt b/requirements/quality.txt index 2be1417a0..4b13d842c 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -133,8 +133,9 @@ lazy==1.6 # xblock lazy-object-proxy==1.4.3 # via astroid -lxml==5.2.1 +lxml==4.9.4 # via + # -c requirements/constraints.txt # -r requirements/test.txt # edx-i18n-tools # xblock @@ -320,7 +321,7 @@ xblock[django]==3.1.0 # via # -r requirements/test.txt # xblock-sdk -xblock-sdk==0.7.0 +xblock-sdk==0.10.0 # via -r requirements/test.txt # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/test.in b/requirements/test.in index f854691d2..d5bb58591 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -12,4 +12,4 @@ openedx-django-pyfs # required by the workbench edx-i18n-tools # For i18n_tool dummy -xblock-sdk # workbench +xblock-sdk>0.7 # workbench diff --git a/requirements/test.txt b/requirements/test.txt index 8b86e100b..c5170af1e 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -90,8 +90,9 @@ lazy==1.6 # via # -r requirements/base.txt # xblock -lxml==5.2.1 +lxml==4.9.4 # via + # -c requirements/constraints.txt # -r requirements/base.txt # edx-i18n-tools # xblock @@ -222,7 +223,7 @@ xblock[django]==3.1.0 # via # -r requirements/base.txt # xblock-sdk -xblock-sdk==0.7.0 +xblock-sdk==0.10.0 # via -r requirements/test.in # The following packages are considered to be unsafe in a requirements file: From 89bd1eb0bd202e15db0351f8946541cf6d37e0ec Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Wed, 17 Apr 2024 15:26:08 +0200 Subject: [PATCH 3/4] feat: add Python 3.11 support --- .github/workflows/ci.yml | 15 ++++++++++++--- setup.py | 1 + tox.ini | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d40d9519..eca9e64df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04] - python-version: [3.8, 3.12] - toxenv: [django42, quality, translations-django42] + toxenv: [py38-django42, py311-django42, py312-django42, py38-quality, py311-quality, py312-quality, translations] steps: - name: checkout repo @@ -28,10 +27,20 @@ jobs: with: submodules: recursive + - name: Extract the Python version from tox environment + run: | + if [[ "${{ matrix.toxenv }}" =~ py[0-9]+ ]]; then + PYTHON_VERSION=$(echo "${{ matrix.toxenv }}" | sed -E 's/py([0-9])([0-9]+).*/\1.\2/') + else + # Default version + PYTHON_VERSION=3.8 + fi + echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV + - name: setup python uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ env.PYTHON_VERSION }} - name: Install translations dependencies if: ${{ startsWith(matrix.toxenv, 'translations') }} diff --git a/setup.py b/setup.py index 0a8aa5ad2..7381f0e4e 100644 --- a/setup.py +++ b/setup.py @@ -118,6 +118,7 @@ def package_data(pkg, root_list): classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Framework :: Django', 'Framework :: Django :: 4.2', diff --git a/tox.ini b/tox.ini index 06ed9963e..864a101a9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38, 312}-django{42},quality,translations-django{42} +envlist = py{38,311,312}-django{42},py{38,311,312}-quality,translations [pycodestyle] exclude = .git,.tox @@ -34,7 +34,7 @@ commands = pylint drag_and_drop_v2 pylint tests --rcfile=tests/pylintrc -[testenv:translations-django42] +[testenv:translations] allowlist_externals = make deps = From d72d39458a59dba534420b3635206743deb1b86c Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Wed, 17 Apr 2024 16:17:00 +0200 Subject: [PATCH 4/4] chore: bump version --- Changelog.md | 7 +++++++ drag_and_drop_v2/__init__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 2cf0de5fc..d1c6af240 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,13 @@ Drag and Drop XBlock changelog Unreleased --------------------------- +Version 4.0.1 (2024-04-17) +-------------------------- + +* Add Python 3.11 support. +* Add Python 3.12 support. +* Drop Django 3.2 support. + Version 4.0.0 (2024-03-12) -------------------------- diff --git a/drag_and_drop_v2/__init__.py b/drag_and_drop_v2/__init__.py index 0b1bfaa09..573743d42 100644 --- a/drag_and_drop_v2/__init__.py +++ b/drag_and_drop_v2/__init__.py @@ -1,4 +1,4 @@ """ Drag and Drop v2 XBlock """ from .drag_and_drop_v2 import DragAndDropBlock -__version__ = "4.0.0" +__version__ = "4.0.1"