From 230fcc87e1e90f90f0bf4d000622ad8de738de59 Mon Sep 17 00:00:00 2001 From: Mohammad Ahtasham ul Hassan Date: Mon, 24 Jan 2022 15:28:29 +0500 Subject: [PATCH] chore: Post Django32 cleanup --- .github/workflows/ci.yml | 62 ++++++++++++------------- CHANGELOG.rst | 7 +++ requirements/base.txt | 34 +++++++------- requirements/ci.txt | 30 ++++++------- requirements/dev.txt | 92 ++++++++++++++++++-------------------- requirements/pip-tools.txt | 10 ++--- requirements/pip.txt | 6 +-- requirements/quality.txt | 92 ++++++++++++++++++-------------------- requirements/test.txt | 62 +++++++++++++------------ setup.py | 6 +-- tox.ini | 24 +++++----- workbench/urls.py | 26 +++++------ 12 files changed, 221 insertions(+), 230 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cc9466a..47a9dcf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,46 +2,46 @@ name: Python CI on: push: branches: - - master + - master pull_request: branches: - - '**' + - '**' jobs: - python-tests: + run_tests: runs-on: ubuntu-latest strategy: matrix: - os: [ ubuntu-20.04 ] - python-version: [ '3.8' ] - toxenv: [ django22, django30, django31, django32 ] + os: [ubuntu-20.04] + python-version: ['3.8'] + toxenv: [django32, django40] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Python setup - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - name: Python setup + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} - - name: Set up test environment - run: | - sudo apt-get install xvfb - wget https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz - mkdir geckodriver - tar -xzf geckodriver-v0.15.0-linux64.tar.gz -C geckodriver - export PATH=$PATH:$(pwd)/geckodriver - export BOTO_CONFIG=/dev/null + - name: Set up test environment + run: | + sudo apt-get install xvfb + wget https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz + mkdir geckodriver + tar -xzf geckodriver-v0.15.0-linux64.tar.gz -C geckodriver + export PATH=$PATH:$(pwd)/geckodriver + export BOTO_CONFIG=/dev/null - - name: Install Requirements - run: | - pip install -r requirements/pip.txt - pip install -r requirements/ci.txt + - name: Install Requirements + run: | + pip install -r requirements/pip.txt + pip install -r requirements/ci.txt - - name: Run Tests - run: xvfb-run --server-args=-ac -- tox -e ${{ matrix.toxenv }} + - name: Run Tests + run: xvfb-run --server-args=-ac -- tox -e ${{ matrix.toxenv }} - - name: Upload coverage to CodeCov - if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - fail_ci_if_error: true + - name: Upload coverage to CodeCov + if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + fail_ci_if_error: true diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 76b680be..a45a7065 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,13 @@ Change history for XBlock SDK These are notable changes in XBlock. +0.5.0 +----- +* Removed Django22, 30 and 31 support +* Added Django40 support +* Renamed CI job so that the our modernizers work fine +* Code changes related to things remved in Django40 + 0.4.0 ----- * Added support for Django 3.0, Django 3.1 and Django 3.2 tests diff --git a/requirements/base.txt b/requirements/base.txt index 175cdc01..7c30039a 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,36 +6,36 @@ # appdirs==1.4.4 # via fs -arrow==1.2.0 +arrow==1.2.1 # via jinja2-time binaryornot==0.4.4 # via cookiecutter boto==2.49.0 # via -r requirements/base.in -boto3==1.18.54 +boto3==1.20.41 # via fs-s3fs -botocore==1.21.54 +botocore==1.23.41 # via # boto3 # s3transfer -certifi==2021.5.30 +certifi==2021.10.8 # via requests chardet==4.0.0 # via binaryornot -charset-normalizer==2.0.6 +charset-normalizer==2.0.10 # via requests -click==8.0.1 +click==8.0.3 # via cookiecutter cookiecutter==1.7.3 # via -r requirements/base.in -django==2.2.24 +django==2.2.26 # via # -c requirements/common_constraints.txt # -r requirements/base.in # django-pyfs -django-pyfs==3.1.0 +django-pyfs==3.2.0 # via -r requirements/base.in -fs==2.4.13 +fs==2.4.14 # via # django-pyfs # fs-s3fs @@ -44,9 +44,9 @@ fs-s3fs==1.1.1 # via # -r requirements/base.in # django-pyfs -idna==3.2 +idna==3.3 # via requests -jinja2==3.0.2 +jinja2==3.0.3 # via # cookiecutter # jinja2-time @@ -58,7 +58,7 @@ jmespath==0.10.0 # botocore lazy==1.4 # via -r requirements/base.in -lxml==4.6.3 +lxml==4.7.1 # via # -r requirements/base.in # xblock @@ -82,15 +82,15 @@ pytz==2021.3 # django # fs # xblock -pyyaml==5.4.1 +pyyaml==6.0 # via xblock -requests==2.26.0 +requests==2.27.1 # via # -r requirements/base.in # cookiecutter s3transfer==0.5.0 # via boto3 -simplejson==3.17.5 +simplejson==3.17.6 # via -r requirements/base.in six==1.16.0 # via @@ -102,11 +102,11 @@ sqlparse==0.4.2 # via django text-unidecode==1.3 # via python-slugify -urllib3==1.26.7 +urllib3==1.26.8 # via # botocore # requests -web-fragments==1.1.0 +web-fragments==2.0.0 # via # -r requirements/base.in # xblock diff --git a/requirements/ci.txt b/requirements/ci.txt index 3947df40..7d048492 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,35 +4,33 @@ # # make upgrade # -backports.entry-points-selectable==1.1.0 - # via virtualenv -certifi==2021.5.30 +certifi==2021.10.8 # via requests -charset-normalizer==2.0.6 +charset-normalizer==2.0.10 # via requests codecov==2.1.12 # via -r requirements/ci.in -coverage==6.0 +coverage==6.2 # via codecov -distlib==0.3.3 +distlib==0.3.4 # via virtualenv -filelock==3.3.0 +filelock==3.4.2 # via # tox # virtualenv -idna==3.2 +idna==3.3 # via requests -packaging==21.0 +packaging==21.3 # via tox -platformdirs==2.4.0 +platformdirs==2.4.1 # via virtualenv pluggy==1.0.0 # via tox -py==1.10.0 +py==1.11.0 # via tox -pyparsing==2.4.7 +pyparsing==3.0.7 # via packaging -requests==2.26.0 +requests==2.27.1 # via codecov six==1.16.0 # via @@ -40,13 +38,13 @@ six==1.16.0 # virtualenv toml==0.10.2 # via tox -tox==3.24.4 +tox==3.24.5 # via # -r requirements/ci.in # tox-battery tox-battery==0.6.1 # via -r requirements/ci.in -urllib3==1.26.7 +urllib3==1.26.8 # via requests -virtualenv==20.8.1 +virtualenv==20.13.0 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 54fa2b5e..4d0a626b 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -13,23 +13,19 @@ appdirs==1.4.4 # -r requirements/base.txt # -r requirements/test.txt # fs -arrow==1.2.0 +arrow==1.2.1 # via # -r requirements/base.txt # -r requirements/test.txt # jinja2-time -astroid==2.8.0 +astroid==2.9.3 # via # pylint # pylint-celery -attrs==21.2.0 +attrs==21.4.0 # via # -r requirements/test.txt # pytest -backports.entry-points-selectable==1.1.0 - # via - # -r requirements/test.txt - # virtualenv binaryornot==0.4.4 # via # -r requirements/base.txt @@ -43,18 +39,18 @@ boto==2.49.0 # via # -r requirements/base.txt # -r requirements/test.txt -boto3==1.18.54 +boto3==1.20.41 # via # -r requirements/base.txt # -r requirements/test.txt # fs-s3fs -botocore==1.21.54 +botocore==1.23.41 # via # -r requirements/base.txt # -r requirements/test.txt # boto3 # s3transfer -certifi==2021.5.30 +certifi==2021.10.8 # via # -r requirements/base.txt # -r requirements/test.txt @@ -64,12 +60,12 @@ chardet==4.0.0 # -r requirements/base.txt # -r requirements/test.txt # binaryornot -charset-normalizer==2.0.6 +charset-normalizer==2.0.10 # via # -r requirements/base.txt # -r requirements/test.txt # requests -click==8.0.1 +click==8.0.3 # via # -r requirements/base.txt # -r requirements/test.txt @@ -85,7 +81,7 @@ cookiecutter==1.7.3 # via # -r requirements/base.txt # -r requirements/test.txt -coverage[toml]==6.0 +coverage[toml]==6.2 # via # -r requirements/test.in # -r requirements/test.txt @@ -94,28 +90,28 @@ ddt==1.4.4 # via # -r requirements/test.in # -r requirements/test.txt -distlib==0.3.3 +distlib==0.3.4 # via # -r requirements/test.txt # virtualenv -django==2.2.24 +django==2.2.26 # via # -c requirements/common_constraints.txt # -r requirements/base.txt # -r requirements/test.txt # django-pyfs -django-pyfs==3.1.0 +django-pyfs==3.2.0 # via # -r requirements/base.txt # -r requirements/test.txt -edx-lint==5.2.0 +edx-lint==5.2.1 # via -r requirements/quality.in -filelock==3.3.0 +filelock==3.4.2 # via # -r requirements/test.txt # tox # virtualenv -fs==2.4.13 +fs==2.4.14 # via # -r requirements/base.txt # -r requirements/test.txt @@ -127,7 +123,7 @@ fs-s3fs==1.1.1 # -r requirements/base.txt # -r requirements/test.txt # django-pyfs -idna==3.2 +idna==3.3 # via # -r requirements/base.txt # -r requirements/test.txt @@ -136,11 +132,11 @@ iniconfig==1.1.1 # via # -r requirements/test.txt # pytest -isort==5.9.3 +isort==5.10.1 # via # -r requirements/quality.in # pylint -jinja2==3.0.2 +jinja2==3.0.3 # via # -r requirements/base.txt # -r requirements/test.txt @@ -164,14 +160,14 @@ lazy==1.4 # -r requirements/test.txt # acid-xblock # bok-choy -lazy-object-proxy==1.6.0 +lazy-object-proxy==1.7.1 # via astroid -lxml==4.6.3 +lxml==4.7.1 # via # -r requirements/base.txt # -r requirements/test.txt # xblock -mako==1.1.5 +mako==1.1.6 # via # -r requirements/test.txt # acid-xblock @@ -196,18 +192,18 @@ nose==1.3.7 # via # -r requirements/test.txt # needle -packaging==21.0 +packaging==21.3 # via # -r requirements/test.txt # pytest # tox -pbr==5.6.0 +pbr==5.8.0 # via stevedore -pillow==8.3.2 +pillow==9.0.0 # via # -r requirements/test.txt # needle -platformdirs==2.4.0 +platformdirs==2.4.1 # via # -r requirements/test.txt # pylint @@ -222,16 +218,16 @@ poyo==0.5.0 # -r requirements/base.txt # -r requirements/test.txt # cookiecutter -py==1.10.0 +py==1.11.0 # via # -r requirements/test.txt # pytest # tox -pycodestyle==2.7.0 +pycodestyle==2.8.0 # via -r requirements/quality.in pydocstyle==6.1.1 # via -r requirements/quality.in -pylint==2.11.1 +pylint==2.12.2 # via # edx-lint # pylint-celery @@ -239,13 +235,13 @@ pylint==2.11.1 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.4.4 +pylint-django==2.5.0 # via edx-lint -pylint-plugin-utils==0.6 +pylint-plugin-utils==0.7 # via # pylint-celery # pylint-django -pyparsing==2.4.7 +pyparsing==3.0.7 # via # -r requirements/test.txt # packaging @@ -263,7 +259,7 @@ pytest-cov==3.0.0 # via # -r requirements/test.in # -r requirements/test.txt -pytest-django==4.4.0 +pytest-django==4.5.2 # via # -r requirements/test.in # -r requirements/test.txt @@ -291,13 +287,13 @@ pytz==2021.3 # django # fs # xblock -pyyaml==5.4.1 +pyyaml==6.0 # via # -r requirements/base.txt # -r requirements/test.txt # code-annotations # xblock -requests==2.26.0 +requests==2.27.1 # via # -r requirements/base.txt # -r requirements/test.txt @@ -313,7 +309,7 @@ selenium==3.4.1 # -r requirements/test.txt # bok-choy # needle -simplejson==3.17.5 +simplejson==3.17.6 # via # -r requirements/base.txt # -r requirements/test.txt @@ -329,14 +325,14 @@ six==1.16.0 # python-dateutil # tox # virtualenv -snowballstemmer==2.1.0 +snowballstemmer==2.2.0 # via pydocstyle sqlparse==0.4.2 # via # -r requirements/base.txt # -r requirements/test.txt # django -stevedore==3.4.0 +stevedore==3.5.0 # via code-annotations text-unidecode==1.3 # via @@ -349,11 +345,11 @@ toml==0.10.2 # pylint # pytest # tox -tomli==1.2.1 +tomli==2.0.0 # via # -r requirements/test.txt # coverage -tox==3.24.4 +tox==3.24.5 # via # -r requirements/test.in # -r requirements/test.txt @@ -362,21 +358,21 @@ tox-battery==0.6.1 # via # -r requirements/test.in # -r requirements/test.txt -typing-extensions==3.10.0.2 +typing-extensions==4.0.1 # via # astroid # pylint -urllib3==1.26.7 +urllib3==1.26.8 # via # -r requirements/base.txt # -r requirements/test.txt # botocore # requests -virtualenv==20.8.1 +virtualenv==20.13.0 # via # -r requirements/test.txt # tox -web-fragments==1.1.0 +web-fragments==2.0.0 # via # -r requirements/base.txt # -r requirements/test.txt @@ -386,7 +382,7 @@ webob==1.8.7 # -r requirements/base.txt # -r requirements/test.txt # xblock -wrapt==1.12.1 +wrapt==1.13.3 # via astroid xblock==1.5.1 # via diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 4588d1b4..f4b49211 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,15 +4,15 @@ # # make upgrade # -click==8.0.1 +click==8.0.3 # via pip-tools -pep517==0.11.0 +pep517==0.12.0 # via pip-tools -pip-tools==6.3.0 +pip-tools==6.4.0 # via -r requirements/pip-tools.in -tomli==1.2.1 +tomli==2.0.0 # via pep517 -wheel==0.37.0 +wheel==0.37.1 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index d6eeb931..de37a34a 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.37.0 +wheel==0.37.1 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==21.2.4 +pip==21.3.1 # via -r requirements/pip.in -setuptools==58.2.0 +setuptools==60.5.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index b512a268..9a09b67f 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -10,22 +10,18 @@ appdirs==1.4.4 # via # -r requirements/test.txt # fs -arrow==1.2.0 +arrow==1.2.1 # via # -r requirements/test.txt # jinja2-time -astroid==2.8.0 +astroid==2.9.3 # via # pylint # pylint-celery -attrs==21.2.0 +attrs==21.4.0 # via # -r requirements/test.txt # pytest -backports.entry-points-selectable==1.1.0 - # via - # -r requirements/test.txt - # virtualenv binaryornot==0.4.4 # via # -r requirements/test.txt @@ -34,16 +30,16 @@ bok_choy==0.7.1 # via -r requirements/test.txt boto==2.49.0 # via -r requirements/test.txt -boto3==1.18.54 +boto3==1.20.41 # via # -r requirements/test.txt # fs-s3fs -botocore==1.21.54 +botocore==1.23.41 # via # -r requirements/test.txt # boto3 # s3transfer -certifi==2021.5.30 +certifi==2021.10.8 # via # -r requirements/test.txt # requests @@ -51,11 +47,11 @@ chardet==4.0.0 # via # -r requirements/test.txt # binaryornot -charset-normalizer==2.0.6 +charset-normalizer==2.0.10 # via # -r requirements/test.txt # requests -click==8.0.1 +click==8.0.3 # via # -r requirements/test.txt # click-log @@ -68,31 +64,31 @@ code-annotations==1.2.0 # via edx-lint cookiecutter==1.7.3 # via -r requirements/test.txt -coverage[toml]==6.0 +coverage[toml]==6.2 # via # -r requirements/test.txt # pytest-cov ddt==1.4.4 # via -r requirements/test.txt -distlib==0.3.3 +distlib==0.3.4 # via # -r requirements/test.txt # virtualenv -django==2.2.24 +django==2.2.26 # via # -c requirements/common_constraints.txt # -r requirements/test.txt # django-pyfs -django-pyfs==3.1.0 +django-pyfs==3.2.0 # via -r requirements/test.txt -edx-lint==5.2.0 +edx-lint==5.2.1 # via -r requirements/quality.in -filelock==3.3.0 +filelock==3.4.2 # via # -r requirements/test.txt # tox # virtualenv -fs==2.4.13 +fs==2.4.14 # via # -r requirements/test.txt # django-pyfs @@ -102,7 +98,7 @@ fs-s3fs==1.1.1 # via # -r requirements/test.txt # django-pyfs -idna==3.2 +idna==3.3 # via # -r requirements/test.txt # requests @@ -110,11 +106,11 @@ iniconfig==1.1.1 # via # -r requirements/test.txt # pytest -isort==5.9.3 +isort==5.10.1 # via # -r requirements/quality.in # pylint -jinja2==3.0.2 +jinja2==3.0.3 # via # -r requirements/test.txt # code-annotations @@ -134,13 +130,13 @@ lazy==1.4 # -r requirements/test.txt # acid-xblock # bok-choy -lazy-object-proxy==1.6.0 +lazy-object-proxy==1.7.1 # via astroid -lxml==4.6.3 +lxml==4.7.1 # via # -r requirements/test.txt # xblock -mako==1.1.5 +mako==1.1.6 # via # -r requirements/test.txt # acid-xblock @@ -162,18 +158,18 @@ nose==1.3.7 # via # -r requirements/test.txt # needle -packaging==21.0 +packaging==21.3 # via # -r requirements/test.txt # pytest # tox -pbr==5.6.0 +pbr==5.8.0 # via stevedore -pillow==8.3.2 +pillow==9.0.0 # via # -r requirements/test.txt # needle -platformdirs==2.4.0 +platformdirs==2.4.1 # via # -r requirements/test.txt # pylint @@ -187,16 +183,16 @@ poyo==0.5.0 # via # -r requirements/test.txt # cookiecutter -py==1.10.0 +py==1.11.0 # via # -r requirements/test.txt # pytest # tox -pycodestyle==2.7.0 +pycodestyle==2.8.0 # via -r requirements/quality.in pydocstyle==6.1.1 # via -r requirements/quality.in -pylint==2.11.1 +pylint==2.12.2 # via # edx-lint # pylint-celery @@ -204,13 +200,13 @@ pylint==2.11.1 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.4.4 +pylint-django==2.5.0 # via edx-lint -pylint-plugin-utils==0.6 +pylint-plugin-utils==0.7 # via # pylint-celery # pylint-django -pyparsing==2.4.7 +pyparsing==3.0.7 # via # -r requirements/test.txt # packaging @@ -224,7 +220,7 @@ pytest==6.2.5 # pytest-rerunfailures pytest-cov==3.0.0 # via -r requirements/test.txt -pytest-django==4.4.0 +pytest-django==4.5.2 # via -r requirements/test.txt pytest-rerunfailures==10.2 # via -r requirements/test.txt @@ -245,12 +241,12 @@ pytz==2021.3 # django # fs # xblock -pyyaml==5.4.1 +pyyaml==6.0 # via # -r requirements/test.txt # code-annotations # xblock -requests==2.26.0 +requests==2.27.1 # via # -r requirements/test.txt # cookiecutter @@ -263,7 +259,7 @@ selenium==3.4.1 # -r requirements/test.txt # bok-choy # needle -simplejson==3.17.5 +simplejson==3.17.6 # via -r requirements/test.txt six==1.16.0 # via @@ -276,13 +272,13 @@ six==1.16.0 # python-dateutil # tox # virtualenv -snowballstemmer==2.1.0 +snowballstemmer==2.2.0 # via pydocstyle sqlparse==0.4.2 # via # -r requirements/test.txt # django -stevedore==3.4.0 +stevedore==3.5.0 # via code-annotations text-unidecode==1.3 # via @@ -294,30 +290,30 @@ toml==0.10.2 # pylint # pytest # tox -tomli==1.2.1 +tomli==2.0.0 # via # -r requirements/test.txt # coverage -tox==3.24.4 +tox==3.24.5 # via # -r requirements/test.txt # tox-battery tox-battery==0.6.1 # via -r requirements/test.txt -typing-extensions==3.10.0.2 +typing-extensions==4.0.1 # via # astroid # pylint -urllib3==1.26.7 +urllib3==1.26.8 # via # -r requirements/test.txt # botocore # requests -virtualenv==20.8.1 +virtualenv==20.13.0 # via # -r requirements/test.txt # tox -web-fragments==1.1.0 +web-fragments==2.0.0 # via # -r requirements/test.txt # xblock @@ -325,7 +321,7 @@ webob==1.8.7 # via # -r requirements/test.txt # xblock -wrapt==1.12.1 +wrapt==1.13.3 # via astroid xblock==1.5.1 # via diff --git a/requirements/test.txt b/requirements/test.txt index 088b184e..194d4e44 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -10,14 +10,12 @@ appdirs==1.4.4 # via # -r requirements/base.txt # fs -arrow==1.2.0 +arrow==1.2.1 # via # -r requirements/base.txt # jinja2-time -attrs==21.2.0 +attrs==21.4.0 # via pytest -backports.entry-points-selectable==1.1.0 - # via virtualenv binaryornot==0.4.4 # via # -r requirements/base.txt @@ -26,16 +24,16 @@ bok_choy==0.7.1 # via -r requirements/test.in boto==2.49.0 # via -r requirements/base.txt -boto3==1.18.54 +boto3==1.20.41 # via # -r requirements/base.txt # fs-s3fs -botocore==1.21.54 +botocore==1.23.41 # via # -r requirements/base.txt # boto3 # s3transfer -certifi==2021.5.30 +certifi==2021.10.8 # via # -r requirements/base.txt # requests @@ -43,35 +41,35 @@ chardet==4.0.0 # via # -r requirements/base.txt # binaryornot -charset-normalizer==2.0.6 +charset-normalizer==2.0.10 # via # -r requirements/base.txt # requests -click==8.0.1 +click==8.0.3 # via # -r requirements/base.txt # cookiecutter cookiecutter==1.7.3 # via -r requirements/base.txt -coverage[toml]==6.0 +coverage[toml]==6.2 # via # -r requirements/test.in # pytest-cov ddt==1.4.4 # via -r requirements/test.in -distlib==0.3.3 +distlib==0.3.4 # via virtualenv # via # -c requirements/common_constraints.txt # -r requirements/base.txt # django-pyfs -django-pyfs==3.1.0 +django-pyfs==3.2.0 # via -r requirements/base.txt -filelock==3.3.0 +filelock==3.4.2 # via # tox # virtualenv -fs==2.4.13 +fs==2.4.14 # via # -r requirements/base.txt # django-pyfs @@ -81,13 +79,13 @@ fs-s3fs==1.1.1 # via # -r requirements/base.txt # django-pyfs -idna==3.2 +idna==3.3 # via # -r requirements/base.txt # requests iniconfig==1.1.1 # via pytest -jinja2==3.0.2 +jinja2==3.0.3 # via # -r requirements/base.txt # cookiecutter @@ -106,11 +104,11 @@ lazy==1.4 # -r requirements/base.txt # acid-xblock # bok-choy -lxml==4.6.3 +lxml==4.7.1 # via # -r requirements/base.txt # xblock -mako==1.1.5 +mako==1.1.6 # via acid-xblock markupsafe==2.0.1 # via @@ -124,13 +122,13 @@ needle==0.5.0 # via bok-choy nose==1.3.7 # via needle -packaging==21.0 +packaging==21.3 # via # pytest # tox -pillow==8.3.2 +pillow==9.0.0 # via needle -platformdirs==2.4.0 +platformdirs==2.4.1 # via virtualenv pluggy==1.0.0 # via @@ -140,11 +138,11 @@ poyo==0.5.0 # via # -r requirements/base.txt # cookiecutter -py==1.10.0 +py==1.11.0 # via # pytest # tox -pyparsing==2.4.7 +pyparsing==3.0.7 # via packaging pypng==0.0.21 # via -r requirements/base.txt @@ -155,7 +153,7 @@ pytest==6.2.5 # pytest-rerunfailures pytest-cov==3.0.0 # via -r requirements/test.in -pytest-django==4.4.0 +pytest-django==4.5.2 # via -r requirements/test.in pytest-rerunfailures==10.2 # via -r requirements/test.in @@ -175,11 +173,11 @@ pytz==2021.3 # django # fs # xblock -pyyaml==5.4.1 +pyyaml==6.0 # via # -r requirements/base.txt # xblock -requests==2.26.0 +requests==2.27.1 # via # -r requirements/base.txt # cookiecutter @@ -192,7 +190,7 @@ selenium==3.4.1 # -r requirements/test.in # bok-choy # needle -simplejson==3.17.5 +simplejson==3.17.6 # via -r requirements/base.txt six==1.16.0 # via @@ -216,22 +214,22 @@ toml==0.10.2 # via # pytest # tox -tomli==1.2.1 +tomli==2.0.0 # via coverage -tox==3.24.4 +tox==3.24.5 # via # -r requirements/test.in # tox-battery tox-battery==0.6.1 # via -r requirements/test.in -urllib3==1.26.7 +urllib3==1.26.8 # via # -r requirements/base.txt # botocore # requests -virtualenv==20.8.1 +virtualenv==20.13.0 # via tox -web-fragments==1.1.0 +web-fragments==2.0.0 # via # -r requirements/base.txt # xblock diff --git a/setup.py b/setup.py index 1873690d..c8a1962d 100644 --- a/setup.py +++ b/setup.py @@ -83,15 +83,13 @@ def get_version(*file_paths): 'workbench', ], install_requires=[ - "Django>=2.2", + "Django>=3.2", ], classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', - 'Framework :: Django :: 2.2', - 'Framework :: Django :: 3.0', - 'Framework :: Django :: 3.1', 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.0', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', diff --git a/tox.ini b/tox.ini index 8250051f..67abfd2f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{22,30,31,32},quality +envlist = py38-django{32,40},quality [pycodestyle] exclude = .git,.tox,migrations @@ -11,25 +11,23 @@ addopts = --cov workbench --cov sample_xblocks --cov-report term-missing --cov-r norecursedirs = .* doc bin prototype screenshots requirements [testenv] -whitelist_externals = +whitelist_externals = make -deps = - django22: Django>=2.2,<2.3 - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 - django32: Django>=3.2,<3.3 +deps = + django32: Django>=3.2,<4.0 + django40: Django>=4.0,<4.1 -r{toxinidir}/requirements/test.txt -passenv = +passenv = DISPLAY BOTO_CONFIG -commands = +commands = make var/workbench.db python -Wd -m pytest {posargs} [testenv:quality] -deps = +deps = -r{toxinidir}/requirements/quality.txt - -commands = +commands = pylint workbench sample_xblocks - isort --check-only --recursive . + isort --check-only . + diff --git a/workbench/urls.py b/workbench/urls.py index 3d6b8ede..6c8c5536 100644 --- a/workbench/urls.py +++ b/workbench/urls.py @@ -2,7 +2,7 @@ -from django.conf.urls import url +from django.urls import re_path from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns @@ -11,57 +11,57 @@ admin.autodiscover() urlpatterns = [ - url(r'^$', views.index, name='workbench_index'), - url( + re_path(r'^$', views.index, name='workbench_index'), + re_path( r'^scenario/(?P[^/]+)/(?P[^/]+)/$', views.show_scenario, name='scenario' ), - url(r'^userlist/$', + re_path(r'^userlist/$', views.user_list, name='userlist'), - url( + re_path( r'^scenario/(?P[^/]+)/$', views.show_scenario, name='workbench_show_scenario' ), - url( + re_path( r'^view/(?P[^/]+)/(?P[^/]+)/$', views.show_scenario, {'template': 'workbench/blockview.html'} ), - url( + re_path( r'^view/(?P[^/]+)/$', views.show_scenario, {'template': 'workbench/blockview.html'} ), - url( + re_path( r'^handler/(?P[^/]+)/(?P[^/]*)(?:/(?P.*))?$', views.handler, {'authenticated': True}, name='handler' ), - url( + re_path( r'^aside_handler/(?P[^/]+)/(?P[^/]*)(?:/(?P.*))?$', views.aside_handler, {'authenticated': True}, name='aside_handler' ), - url( + re_path( r'^unauth_handler/(?P[^/]+)/(?P[^/]*)(?:/(?P.*))?$', views.handler, {'authenticated': False}, name='unauth_handler' ), - url( + re_path( r'^resource/(?P[^/]+)/(?P.*)$', views.package_resource, name='package_resource' ), - url( + re_path( r'^reset_state$', views.reset_state, name='reset_state' ), - url(r'^admin/', admin.site.urls), + re_path(r'^admin/', admin.site.urls), ] urlpatterns += staticfiles_urlpatterns()