From f4261b44a9a4d9239ceb78e7bb620d83b6d875a9 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 4 Oct 2021 17:37:18 +0500 Subject: [PATCH] feat: Add django 3.2 testing support --- .github/workflows/ci.yml | 47 ++++ .github/workflows/docker-publish.yml | 22 ++ .github/workflows/pypi-publish.yml | 31 +++ .travis.yml | 67 +++--- CHANGELOG.rst | 11 + Makefile | 20 +- requirements/base.in | 2 +- requirements/base.txt | 62 +++--- requirements/{travis.in => ci.in} | 2 +- requirements/{travis.txt => ci.txt} | 40 ++-- requirements/common_constraints.txt | 24 +++ .../constraints.txt | 3 +- requirements/dev.txt | 204 +++++++++++------- requirements/pip-tools.in | 4 + requirements/pip-tools.txt | 20 ++ requirements/pip.in | 5 + requirements/pip.txt | 14 ++ requirements/quality.in | 2 +- requirements/quality.txt | 151 +++++++------ requirements/test.in | 3 +- requirements/test.txt | 184 ++++++++++------ setup.py | 5 +- tox.ini | 2 +- workbench/blocks.py | 2 +- workbench/settings.py | 1 + 25 files changed, 615 insertions(+), 313 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/docker-publish.yml create mode 100644 .github/workflows/pypi-publish.yml rename requirements/{travis.in => ci.in} (91%) rename requirements/{travis.txt => ci.txt} (51%) create mode 100644 requirements/common_constraints.txt rename constraints.txt => requirements/constraints.txt (83%) create mode 100644 requirements/pip-tools.in create mode 100644 requirements/pip-tools.txt create mode 100644 requirements/pip.in create mode 100644 requirements/pip.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..0b0c6ee3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI +on: + push: + branches: + - master + pull_request: + branches: + - '**' +jobs: + python-tests: + runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-20.04 ] + python-version: [ '3.8' ] + toxenv: [ django22, django30, django31, django32 ] + steps: + - uses: actions/checkout@v2 + + - 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: 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: 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/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 00000000..3f4c1089 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,22 @@ +name: Push Docker Images + +on: + push: + branches: + - master +jobs: + # Push image to GitHub Packages. + # See also https://docs.docker.com/docker-hub/builds/ + push: + runs-on: ubuntu-latest + if: github.event_name == 'push' + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build and Push docker image + env: + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + run : make travis_docker_push diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 00000000..6246904b --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,31 @@ +name: Publish package to PyPi + +on: + push: + tags: + - '*' + +jobs: + + push: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Build package + run: python setup.py sdist bdist_wheel + + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_UPLOAD_TOKEN }} diff --git a/.travis.yml b/.travis.yml index 56a6a07a..8f71b052 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,47 +1,52 @@ dist: latest language: python python: -- 3.8 + - '3.8' env: matrix: - - TOXENV=django22 - - TOXENV=django30 + - TOXENV=django22 + - TOXENV=django30 + - TOXENV=django31 + - TOXENV=django32 global: - - DOCKER_USERNAME=edxbuilder + - DOCKER_USERNAME=edxbuilder # encrypted DOCKER_PASSWORD - - secure: JWmtldloBZLU/+M3FlKaVGM9Kn3jMa4RTGGB84P2VIDMoCeKk6JBgdYLvt8LXx8bLV5/1JcBL+oNOWGWE7SL/AhfTKXwGq1FYdt9Nu8UqtscfIEbzBwT0MdLZtfOHqS7c7MP0ViKIcOcyj7o+vpuauJVx6MGgAzBhFH6QlVQLZU= - - secure: ZAQze5XdSm8VEdmMdpXIxF8y163XbbnsDw+06ue5yYG41OGKcZW0u92CgzuKyjaamKJFPfST05ap9L/AxYjJ7A7bmYBUeMyMkIuHMPeJ1XOtMEtsb2x3hV5x2Z3kjxUCD/YYExDTvoGqcEbNamGZLkGPI+hJ+WXSGzw9OXqztF8= + - secure: JWmtldloBZLU/+M3FlKaVGM9Kn3jMa4RTGGB84P2VIDMoCeKk6JBgdYLvt8LXx8bLV5/1JcBL+oNOWGWE7SL/AhfTKXwGq1FYdt9Nu8UqtscfIEbzBwT0MdLZtfOHqS7c7MP0ViKIcOcyj7o+vpuauJVx6MGgAzBhFH6QlVQLZU= + - secure: ZAQze5XdSm8VEdmMdpXIxF8y163XbbnsDw+06ue5yYG41OGKcZW0u92CgzuKyjaamKJFPfST05ap9L/AxYjJ7A7bmYBUeMyMkIuHMPeJ1XOtMEtsb2x3hV5x2Z3kjxUCD/YYExDTvoGqcEbNamGZLkGPI+hJ+WXSGzw9OXqztF8= addons: firefox: 52.0.1 services: -- docker + - docker cache: directories: - - "$HOME/.cache/pip" + - $HOME/.cache/pip before_install: -- 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 -- pip install pip==20.0.2 -- export BOTO_CONFIG=/dev/null + - 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 install: -- pip install tox-travis -- pip install -r requirements/travis.txt + - pip install -r requirements/pip.txt + - pip install tox-travis + - pip install -r requirements/ci.txt script: -- xvfb-run --server-args=-ac -- tox + - xvfb-run --server-args=-ac -- tox after_success: -- codecov -deploy: - provider: pypi - user: edx - password: - secure: DrrqJy3pyUC7hRESSchvtPFIiYCjHMsE1Cuq78nO3Z9Y+5Vlo8LRw76ui3lx5A1npOy/cp86eOoV01pPnOwv50ieo4xYbR6BuphLTvwaaBW3d2Hf3CRuq/fgg2vVR2QBJMCvNLOgI14D3von4PDxeiaI4Gu5hWWZJvBn+7w+inY= - distributions: sdist bdist_wheel - on: - tags: true - python: 3.8 - condition: "$TOXENV=django22" -after_deploy: -- make travis_docker_push + - codecov +# +# The following actions have been switched to github CI. +# +#deploy: +# provider: pypi +# user: edx +# password: +# secure: DrrqJy3pyUC7hRESSchvtPFIiYCjHMsE1Cuq78nO3Z9Y+5Vlo8LRw76ui3lx5A1npOy/cp86eOoV01pPnOwv50ieo4xYbR6BuphLTvwaaBW3d2Hf3CRuq/fgg2vVR2QBJMCvNLOgI14D3von4PDxeiaI4Gu5hWWZJvBn+7w+inY= +# distributions: sdist bdist_wheel +# on: +# tags: true +# python: 3.8 +# condition: $TOXENV=django22 +#after_deploy: +# - make travis_docker_push diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a5a1e4e9..76b680be 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,17 @@ Change history for XBlock SDK These are notable changes in XBlock. +0.4.0 +----- +* Added support for Django 3.0, Django 3.1 and Django 3.2 tests +* Added GitHub CI to replace Travis + +0.3.0 +----- +* Dropped support for Python 3.5 +* Upgraded Code To Python 3.8 Standards +* Upgraded dependencies to Python 3.8 + 0.2.0 ----- * Released on PyPI diff --git a/Makefile b/Makefile index 2781bf76..6c7824bb 100755 --- a/Makefile +++ b/Makefile @@ -49,14 +49,22 @@ coverage: clean ## generate and view HTML coverage report pytest --cov-report html $(BROWSER) htmlcov/index.html -export CUSTOM_COMPILE_COMMAND = make upgrade -upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in - pip install -q pip-tools +COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt +.PHONY: $(COMMON_CONSTRAINTS_TXT) +$(COMMON_CONSTRAINTS_TXT): + wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)" + +upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade +upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in + pip install -qr requirements/pip-tools.txt + # Make sure to compile files after any other files they include! + pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in + pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in pip-compile --rebuild --upgrade -o requirements/base.txt requirements/base.in - pip-compile --rebuild --upgrade -o requirements/test.txt requirements/base.in requirements/test.in + pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in pip-compile --rebuild --upgrade -o requirements/quality.txt requirements/quality.in - pip-compile --rebuild --upgrade -o requirements/travis.txt requirements/travis.in - pip-compile --rebuild --upgrade -o requirements/dev.txt requirements/base.in requirements/test.in requirements/quality.in + pip-compile --rebuild --upgrade -o requirements/ci.txt requirements/ci.in + pip-compile --rebuild --upgrade -o requirements/dev.txt requirements/test.in requirements/quality.in # Let tox control the Django version for tests sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp mv requirements/test.tmp requirements/test.txt diff --git a/requirements/base.in b/requirements/base.in index 9dc36fe4..6caee6d3 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -1,6 +1,6 @@ # Pinned versions here match edx-platform versions, and should be upgraded frequently --c ../constraints.txt +-c constraints.txt boto cookiecutter diff --git a/requirements/base.txt b/requirements/base.txt index 790d36ed..175cdc01 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,57 +1,57 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade # appdirs==1.4.4 # via fs -arrow==1.1.0 +arrow==1.2.0 # via jinja2-time binaryornot==0.4.4 # via cookiecutter -boto3==1.17.78 - # via fs-s3fs boto==2.49.0 # via -r requirements/base.in -botocore==1.20.78 +boto3==1.18.54 + # via fs-s3fs +botocore==1.21.54 # via # boto3 # s3transfer -certifi==2020.12.5 +certifi==2021.5.30 # via requests chardet==4.0.0 - # via - # binaryornot - # requests + # via binaryornot +charset-normalizer==2.0.6 + # via requests click==8.0.1 # via cookiecutter cookiecutter==1.7.3 # via -r requirements/base.in -django-pyfs==3.0 - # via -r requirements/base.in -django==2.2.23 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/base.in - # django-pyfs -fs-s3fs==1.1.1 +django==2.2.24 # via + # -c requirements/common_constraints.txt # -r requirements/base.in # django-pyfs +django-pyfs==3.1.0 + # via -r requirements/base.in fs==2.4.13 # via # django-pyfs # fs-s3fs # xblock -idna==2.10 +fs-s3fs==1.1.1 + # via + # -r requirements/base.in + # django-pyfs +idna==3.2 # via requests -jinja2-time==0.2.0 - # via cookiecutter -jinja2==3.0.1 +jinja2==3.0.2 # via # cookiecutter # jinja2-time +jinja2-time==0.2.0 + # via cookiecutter jmespath==0.10.0 # via # boto3 @@ -68,29 +68,29 @@ markupsafe==2.0.1 # xblock poyo==0.5.0 # via cookiecutter -pypng==0.0.20 +pypng==0.0.21 # via -r requirements/base.in -python-dateutil==2.8.1 +python-dateutil==2.8.2 # via # arrow # botocore # xblock python-slugify==5.0.2 # via cookiecutter -pytz==2021.1 +pytz==2021.3 # via # django # fs # xblock pyyaml==5.4.1 # via xblock -requests==2.25.1 +requests==2.26.0 # via # -r requirements/base.in # cookiecutter -s3transfer==0.4.2 +s3transfer==0.5.0 # via boto3 -simplejson==3.17.2 +simplejson==3.17.5 # via -r requirements/base.in six==1.16.0 # via @@ -98,15 +98,15 @@ six==1.16.0 # fs # fs-s3fs # python-dateutil -sqlparse==0.4.1 +sqlparse==0.4.2 # via django text-unidecode==1.3 # via python-slugify -urllib3==1.26.4 +urllib3==1.26.7 # via # botocore # requests -web-fragments==1.0.0 +web-fragments==1.1.0 # via # -r requirements/base.in # xblock @@ -114,7 +114,7 @@ webob==1.8.7 # via # -r requirements/base.in # xblock -xblock==1.4.1 +xblock==1.5.1 # via -r requirements/base.in # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/travis.in b/requirements/ci.in similarity index 91% rename from requirements/travis.in rename to requirements/ci.in index 7176bf73..ee2c0010 100644 --- a/requirements/travis.in +++ b/requirements/ci.in @@ -1,6 +1,6 @@ # Requirements for running tests in Travis --c ../constraints.txt +-c constraints.txt codecov # Code coverage reporting tox # Virtualenv management for tests diff --git a/requirements/travis.txt b/requirements/ci.txt similarity index 51% rename from requirements/travis.txt rename to requirements/ci.txt index ed9fff33..3947df40 100644 --- a/requirements/travis.txt +++ b/requirements/ci.txt @@ -1,36 +1,38 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade # -appdirs==1.4.4 +backports.entry-points-selectable==1.1.0 # via virtualenv -certifi==2020.12.5 +certifi==2021.5.30 # via requests -chardet==4.0.0 +charset-normalizer==2.0.6 # via requests -codecov==2.1.11 - # via -r requirements/travis.in -coverage==5.5 +codecov==2.1.12 + # via -r requirements/ci.in +coverage==6.0 # via codecov -distlib==0.3.1 +distlib==0.3.3 # via virtualenv -filelock==3.0.12 +filelock==3.3.0 # via # tox # virtualenv -idna==2.10 +idna==3.2 # via requests -packaging==20.9 +packaging==21.0 # via tox -pluggy==0.13.1 +platformdirs==2.4.0 + # via virtualenv +pluggy==1.0.0 # via tox py==1.10.0 # via tox pyparsing==2.4.7 # via packaging -requests==2.25.1 +requests==2.26.0 # via codecov six==1.16.0 # via @@ -38,13 +40,13 @@ six==1.16.0 # virtualenv toml==0.10.2 # via tox -tox-battery==0.6.1 - # via -r requirements/travis.in -tox==3.23.1 +tox==3.24.4 # via - # -r requirements/travis.in + # -r requirements/ci.in # tox-battery -urllib3==1.26.4 +tox-battery==0.6.1 + # via -r requirements/ci.in +urllib3==1.26.7 # via requests -virtualenv==20.4.6 +virtualenv==20.8.1 # via tox diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt new file mode 100644 index 00000000..a0189aa0 --- /dev/null +++ b/requirements/common_constraints.txt @@ -0,0 +1,24 @@ +# A central location for most common version constraints +# (across edx repos) for pip-installation. +# +# Similar to other constraint files this file doesn't install any packages. +# It specifies version constraints that will be applied if a package is needed. +# When pinning something here, please provide an explanation of why it is a good +# idea to pin this package across all edx repos, Ideally, link to other information +# that will help people in the future to remove the pin when possible. +# Writing an issue against the offending project and linking to it here is good. +# +# Note: Changes to this file will automatically be used by other repos, referencing +# this file from Github directly. It does not require packaging in edx-lint. + + +# using LTS django version +Django<2.3 + +# latest version is causing e2e failures in edx-platform. +# See pyjwt[crypto]<2.0.0 comment. +drf-jwt<1.19.1 + +# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process. +# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html +elasticsearch<7.14.0 diff --git a/constraints.txt b/requirements/constraints.txt similarity index 83% rename from constraints.txt rename to requirements/constraints.txt index d91704bb..a40d59b8 100644 --- a/constraints.txt +++ b/requirements/constraints.txt @@ -9,4 +9,5 @@ # linking to it here is good. # Common constraints for edx repos --c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt +-c common_constraints.txt + diff --git a/requirements/dev.txt b/requirements/dev.txt index 3a47a7ea..54fa2b5e 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade @@ -10,14 +10,15 @@ acid-xblock==0.2.1 # -r requirements/test.txt appdirs==1.4.4 # via + # -r requirements/base.txt # -r requirements/test.txt # fs - # virtualenv -arrow==1.1.0 +arrow==1.2.0 # via + # -r requirements/base.txt # -r requirements/test.txt # jinja2-time -astroid==2.5.6 +astroid==2.8.0 # via # pylint # pylint-celery @@ -25,139 +26,158 @@ attrs==21.2.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 # -r requirements/test.txt # cookiecutter bok_choy==0.7.1 # via # -r requirements/test.in # -r requirements/test.txt -boto3==1.17.78 +boto==2.49.0 # via + # -r requirements/base.txt # -r requirements/test.txt - # fs-s3fs -boto==2.49.0 +boto3==1.18.54 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt -botocore==1.20.78 + # fs-s3fs +botocore==1.21.54 # via + # -r requirements/base.txt # -r requirements/test.txt # boto3 # s3transfer -certifi==2020.12.5 +certifi==2021.5.30 # via + # -r requirements/base.txt # -r requirements/test.txt # requests chardet==4.0.0 # via + # -r requirements/base.txt # -r requirements/test.txt # binaryornot +charset-normalizer==2.0.6 + # via + # -r requirements/base.txt + # -r requirements/test.txt # requests -click-log==0.3.2 - # via edx-lint click==8.0.1 # via + # -r requirements/base.txt # -r requirements/test.txt # click-log # code-annotations # cookiecutter # edx-lint -code-annotations==1.1.2 +click-log==0.3.2 + # via edx-lint +code-annotations==1.2.0 # via edx-lint cookiecutter==1.7.3 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt -coverage[toml]==5.5 +coverage[toml]==6.0 # via # -r requirements/test.in # -r requirements/test.txt # pytest-cov -ddt==1.4.2 +ddt==1.4.4 # via # -r requirements/test.in # -r requirements/test.txt -distlib==0.3.1 +distlib==0.3.3 # via # -r requirements/test.txt # virtualenv -django-pyfs==3.0 +django==2.2.24 # via - # -r requirements/base.in + # -c requirements/common_constraints.txt + # -r requirements/base.txt # -r requirements/test.txt -django==2.2.23 + # django-pyfs +django-pyfs==3.1.0 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt - # django-pyfs - # edx-lint -edx-lint==5.0.0 +edx-lint==5.2.0 # via -r requirements/quality.in -filelock==3.0.12 +filelock==3.3.0 # via # -r requirements/test.txt # tox # virtualenv -fs-s3fs==1.1.1 - # via - # -r requirements/base.in - # -r requirements/test.txt - # django-pyfs fs==2.4.13 # via + # -r requirements/base.txt # -r requirements/test.txt # django-pyfs # fs-s3fs # xblock -idna==2.10 +fs-s3fs==1.1.1 # via + # -r requirements/base.txt + # -r requirements/test.txt + # django-pyfs +idna==3.2 + # via + # -r requirements/base.txt # -r requirements/test.txt # requests iniconfig==1.1.1 # via # -r requirements/test.txt # pytest -isort==5.8.0 +isort==5.9.3 # via # -r requirements/quality.in # pylint -jinja2-time==0.2.0 +jinja2==3.0.2 # via + # -r requirements/base.txt # -r requirements/test.txt + # code-annotations # cookiecutter -jinja2==3.0.1 + # jinja2-time +jinja2-time==0.2.0 # via + # -r requirements/base.txt # -r requirements/test.txt - # code-annotations # cookiecutter - # jinja2-time jmespath==0.10.0 # via + # -r requirements/base.txt # -r requirements/test.txt # boto3 # botocore -lazy-object-proxy==1.6.0 - # via astroid lazy==1.4 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt # acid-xblock # bok-choy +lazy-object-proxy==1.6.0 + # via astroid lxml==4.6.3 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt # xblock -mako==1.1.4 +mako==1.1.5 # via # -r requirements/test.txt # acid-xblock markupsafe==2.0.1 # via + # -r requirements/base.txt # -r requirements/test.txt # jinja2 # mako @@ -176,24 +196,30 @@ nose==1.3.7 # via # -r requirements/test.txt # needle -packaging==20.9 +packaging==21.0 # via # -r requirements/test.txt # pytest # tox pbr==5.6.0 # via stevedore -pillow==8.2.0 +pillow==8.3.2 # via # -r requirements/test.txt # needle -pluggy==0.13.1 +platformdirs==2.4.0 + # via + # -r requirements/test.txt + # pylint + # virtualenv +pluggy==1.0.0 # via # -r requirements/test.txt # pytest # tox poyo==0.5.0 # via + # -r requirements/base.txt # -r requirements/test.txt # cookiecutter py==1.10.0 @@ -205,6 +231,12 @@ pycodestyle==2.7.0 # via -r requirements/quality.in pydocstyle==6.1.1 # via -r requirements/quality.in +pylint==2.11.1 + # via + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils pylint-celery==0.3 # via edx-lint pylint-django==2.4.4 @@ -213,67 +245,66 @@ pylint-plugin-utils==0.6 # via # pylint-celery # pylint-django -pylint==2.8.2 - # via - # edx-lint - # pylint-celery - # pylint-django - # pylint-plugin-utils pyparsing==2.4.7 # via # -r requirements/test.txt # packaging -pypng==0.0.20 +pypng==0.0.21 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt -pytest-cov==2.12.0 +pytest==6.2.5 # via - # -r requirements/test.in # -r requirements/test.txt -pytest-django==4.3.0 + # pytest-cov + # pytest-django + # pytest-rerunfailures +pytest-cov==3.0.0 # via # -r requirements/test.in # -r requirements/test.txt -pytest-rerunfailures==9.1.1 +pytest-django==4.4.0 # via # -r requirements/test.in # -r requirements/test.txt -pytest==6.2.4 +pytest-rerunfailures==10.2 # via + # -r requirements/test.in # -r requirements/test.txt - # pytest-cov - # pytest-django - # pytest-rerunfailures -python-dateutil==2.8.1 +python-dateutil==2.8.2 # via + # -r requirements/base.txt # -r requirements/test.txt # arrow # botocore # xblock python-slugify==5.0.2 # via + # -r requirements/base.txt # -r requirements/test.txt # code-annotations # cookiecutter -pytz==2021.1 +pytz==2021.3 # via + # -r requirements/base.txt # -r requirements/test.txt # django # fs # xblock pyyaml==5.4.1 # via + # -r requirements/base.txt # -r requirements/test.txt # code-annotations # xblock -requests==2.25.1 +requests==2.26.0 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt # cookiecutter -s3transfer==0.4.2 +s3transfer==0.5.0 # via + # -r requirements/base.txt # -r requirements/test.txt # boto3 selenium==3.4.1 @@ -282,12 +313,13 @@ selenium==3.4.1 # -r requirements/test.txt # bok-choy # needle -simplejson==3.17.2 +simplejson==3.17.5 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt six==1.16.0 # via + # -r requirements/base.txt # -r requirements/test.txt # bok-choy # cookiecutter @@ -299,56 +331,66 @@ six==1.16.0 # virtualenv snowballstemmer==2.1.0 # via pydocstyle -sqlparse==0.4.1 +sqlparse==0.4.2 # via + # -r requirements/base.txt # -r requirements/test.txt # django -stevedore==3.3.0 +stevedore==3.4.0 # via code-annotations text-unidecode==1.3 # via + # -r requirements/base.txt # -r requirements/test.txt # python-slugify toml==0.10.2 # via # -r requirements/test.txt - # coverage # pylint # pytest # tox -tox-battery==0.6.1 +tomli==1.2.1 # via - # -r requirements/test.in # -r requirements/test.txt -tox==3.23.1 + # coverage +tox==3.24.4 # via # -r requirements/test.in # -r requirements/test.txt # tox-battery -urllib3==1.26.4 +tox-battery==0.6.1 + # via + # -r requirements/test.in + # -r requirements/test.txt +typing-extensions==3.10.0.2 + # via + # astroid + # pylint +urllib3==1.26.7 # via + # -r requirements/base.txt # -r requirements/test.txt # botocore # requests -virtualenv==20.4.6 +virtualenv==20.8.1 # via # -r requirements/test.txt # tox -web-fragments==1.0.0 +web-fragments==1.1.0 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt # xblock webob==1.8.7 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt # xblock wrapt==1.12.1 # via astroid -xblock==1.4.1 +xblock==1.5.1 # via - # -r requirements/base.in + # -r requirements/base.txt # -r requirements/test.txt # acid-xblock diff --git a/requirements/pip-tools.in b/requirements/pip-tools.in new file mode 100644 index 00000000..3f1b64ae --- /dev/null +++ b/requirements/pip-tools.in @@ -0,0 +1,4 @@ +# Just the dependencies to run pip-tools, mainly for the "upgrade" make target +-c constraints.txt + +pip-tools # Contains pip-compile, used to generate pip requirements files diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt new file mode 100644 index 00000000..4588d1b4 --- /dev/null +++ b/requirements/pip-tools.txt @@ -0,0 +1,20 @@ +# +# This file is autogenerated by pip-compile with python 3.8 +# To update, run: +# +# make upgrade +# +click==8.0.1 + # via pip-tools +pep517==0.11.0 + # via pip-tools +pip-tools==6.3.0 + # via -r requirements/pip-tools.in +tomli==1.2.1 + # via pep517 +wheel==0.37.0 + # via pip-tools + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools diff --git a/requirements/pip.in b/requirements/pip.in new file mode 100644 index 00000000..21ce8e9d --- /dev/null +++ b/requirements/pip.in @@ -0,0 +1,5 @@ +# Core dependencies for installing other packages + +pip +setuptools +wheel diff --git a/requirements/pip.txt b/requirements/pip.txt new file mode 100644 index 00000000..d6eeb931 --- /dev/null +++ b/requirements/pip.txt @@ -0,0 +1,14 @@ +# +# This file is autogenerated by pip-compile with python 3.8 +# To update, run: +# +# make upgrade +# +wheel==0.37.0 + # via -r requirements/pip.in + +# The following packages are considered to be unsafe in a requirements file: +pip==21.2.4 + # via -r requirements/pip.in +setuptools==58.2.0 + # via -r requirements/pip.in diff --git a/requirements/quality.in b/requirements/quality.in index cdc462da..b674ddbf 100644 --- a/requirements/quality.in +++ b/requirements/quality.in @@ -1,6 +1,6 @@ # Requirements for code quality checks --c ../constraints.txt +-c constraints.txt -r test.txt edx-lint # edX pylint rules and plugins diff --git a/requirements/quality.txt b/requirements/quality.txt index 76adc046..b512a268 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade @@ -10,12 +10,11 @@ appdirs==1.4.4 # via # -r requirements/test.txt # fs - # virtualenv -arrow==1.1.0 +arrow==1.2.0 # via # -r requirements/test.txt # jinja2-time -astroid==2.5.6 +astroid==2.8.0 # via # pylint # pylint-celery @@ -23,24 +22,28 @@ attrs==21.2.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 # cookiecutter bok_choy==0.7.1 # via -r requirements/test.txt -boto3==1.17.78 +boto==2.49.0 + # via -r requirements/test.txt +boto3==1.18.54 # via # -r requirements/test.txt # fs-s3fs -boto==2.49.0 - # via -r requirements/test.txt -botocore==1.20.78 +botocore==1.21.54 # via # -r requirements/test.txt # boto3 # s3transfer -certifi==2020.12.5 +certifi==2021.5.30 # via # -r requirements/test.txt # requests @@ -48,9 +51,10 @@ chardet==4.0.0 # via # -r requirements/test.txt # binaryornot +charset-normalizer==2.0.6 + # via + # -r requirements/test.txt # requests -click-log==0.3.2 - # via edx-lint click==8.0.1 # via # -r requirements/test.txt @@ -58,46 +62,47 @@ click==8.0.1 # code-annotations # cookiecutter # edx-lint -code-annotations==1.1.2 +click-log==0.3.2 + # via edx-lint +code-annotations==1.2.0 # via edx-lint cookiecutter==1.7.3 # via -r requirements/test.txt -coverage[toml]==5.5 +coverage[toml]==6.0 # via # -r requirements/test.txt # pytest-cov -ddt==1.4.2 +ddt==1.4.4 # via -r requirements/test.txt -distlib==0.3.1 +distlib==0.3.3 # via # -r requirements/test.txt # virtualenv -django-pyfs==3.0 - # via -r requirements/test.txt -django==2.2.23 +django==2.2.24 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/common_constraints.txt # -r requirements/test.txt # django-pyfs - # edx-lint -edx-lint==5.0.0 +django-pyfs==3.1.0 + # via -r requirements/test.txt +edx-lint==5.2.0 # via -r requirements/quality.in -filelock==3.0.12 +filelock==3.3.0 # via # -r requirements/test.txt # tox # virtualenv -fs-s3fs==1.1.1 - # via - # -r requirements/test.txt - # django-pyfs fs==2.4.13 # via # -r requirements/test.txt # django-pyfs # fs-s3fs # xblock -idna==2.10 +fs-s3fs==1.1.1 + # via + # -r requirements/test.txt + # django-pyfs +idna==3.2 # via # -r requirements/test.txt # requests @@ -105,37 +110,37 @@ iniconfig==1.1.1 # via # -r requirements/test.txt # pytest -isort==5.8.0 +isort==5.9.3 # via # -r requirements/quality.in # pylint -jinja2-time==0.2.0 +jinja2==3.0.2 # via # -r requirements/test.txt + # code-annotations # cookiecutter -jinja2==3.0.1 + # jinja2-time +jinja2-time==0.2.0 # via # -r requirements/test.txt - # code-annotations # cookiecutter - # jinja2-time jmespath==0.10.0 # via # -r requirements/test.txt # boto3 # botocore -lazy-object-proxy==1.6.0 - # via astroid lazy==1.4 # via # -r requirements/test.txt # acid-xblock # bok-choy +lazy-object-proxy==1.6.0 + # via astroid lxml==4.6.3 # via # -r requirements/test.txt # xblock -mako==1.1.4 +mako==1.1.5 # via # -r requirements/test.txt # acid-xblock @@ -157,18 +162,23 @@ nose==1.3.7 # via # -r requirements/test.txt # needle -packaging==20.9 +packaging==21.0 # via # -r requirements/test.txt # pytest # tox pbr==5.6.0 # via stevedore -pillow==8.2.0 +pillow==8.3.2 # via # -r requirements/test.txt # needle -pluggy==0.13.1 +platformdirs==2.4.0 + # via + # -r requirements/test.txt + # pylint + # virtualenv +pluggy==1.0.0 # via # -r requirements/test.txt # pytest @@ -186,6 +196,12 @@ pycodestyle==2.7.0 # via -r requirements/quality.in pydocstyle==6.1.1 # via -r requirements/quality.in +pylint==2.11.1 + # via + # edx-lint + # pylint-celery + # pylint-django + # pylint-plugin-utils pylint-celery==0.3 # via edx-lint pylint-django==2.4.4 @@ -194,31 +210,25 @@ pylint-plugin-utils==0.6 # via # pylint-celery # pylint-django -pylint==2.8.2 - # via - # edx-lint - # pylint-celery - # pylint-django - # pylint-plugin-utils pyparsing==2.4.7 # via # -r requirements/test.txt # packaging -pypng==0.0.20 +pypng==0.0.21 # via -r requirements/test.txt -pytest-cov==2.12.0 - # via -r requirements/test.txt -pytest-django==4.3.0 - # via -r requirements/test.txt -pytest-rerunfailures==9.1.1 - # via -r requirements/test.txt -pytest==6.2.4 +pytest==6.2.5 # via # -r requirements/test.txt # pytest-cov # pytest-django # pytest-rerunfailures -python-dateutil==2.8.1 +pytest-cov==3.0.0 + # via -r requirements/test.txt +pytest-django==4.4.0 + # via -r requirements/test.txt +pytest-rerunfailures==10.2 + # via -r requirements/test.txt +python-dateutil==2.8.2 # via # -r requirements/test.txt # arrow @@ -229,7 +239,7 @@ python-slugify==5.0.2 # -r requirements/test.txt # code-annotations # cookiecutter -pytz==2021.1 +pytz==2021.3 # via # -r requirements/test.txt # django @@ -240,11 +250,11 @@ pyyaml==5.4.1 # -r requirements/test.txt # code-annotations # xblock -requests==2.25.1 +requests==2.26.0 # via # -r requirements/test.txt # cookiecutter -s3transfer==0.4.2 +s3transfer==0.5.0 # via # -r requirements/test.txt # boto3 @@ -253,7 +263,7 @@ selenium==3.4.1 # -r requirements/test.txt # bok-choy # needle -simplejson==3.17.2 +simplejson==3.17.5 # via -r requirements/test.txt six==1.16.0 # via @@ -268,11 +278,11 @@ six==1.16.0 # virtualenv snowballstemmer==2.1.0 # via pydocstyle -sqlparse==0.4.1 +sqlparse==0.4.2 # via # -r requirements/test.txt # django -stevedore==3.3.0 +stevedore==3.4.0 # via code-annotations text-unidecode==1.3 # via @@ -281,26 +291,33 @@ text-unidecode==1.3 toml==0.10.2 # via # -r requirements/test.txt - # coverage # pylint # pytest # tox -tox-battery==0.6.1 - # via -r requirements/test.txt -tox==3.23.1 +tomli==1.2.1 + # via + # -r requirements/test.txt + # coverage +tox==3.24.4 # via # -r requirements/test.txt # tox-battery -urllib3==1.26.4 +tox-battery==0.6.1 + # via -r requirements/test.txt +typing-extensions==3.10.0.2 + # via + # astroid + # pylint +urllib3==1.26.7 # via # -r requirements/test.txt # botocore # requests -virtualenv==20.4.6 +virtualenv==20.8.1 # via # -r requirements/test.txt # tox -web-fragments==1.0.0 +web-fragments==1.1.0 # via # -r requirements/test.txt # xblock @@ -310,7 +327,7 @@ webob==1.8.7 # xblock wrapt==1.12.1 # via astroid -xblock==1.4.1 +xblock==1.5.1 # via # -r requirements/test.txt # acid-xblock diff --git a/requirements/test.in b/requirements/test.in index ff91365a..8811b0c3 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -1,4 +1,5 @@ --c ../constraints.txt +-c constraints.txt +-r base.txt acid-xblock bok_choy==0.7.1 diff --git a/requirements/test.txt b/requirements/test.txt index 22ec33e0..088b184e 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # make upgrade @@ -8,88 +8,113 @@ acid-xblock==0.2.1 # via -r requirements/test.in appdirs==1.4.4 # via + # -r requirements/base.txt # fs - # virtualenv -arrow==1.1.0 - # via jinja2-time +arrow==1.2.0 + # via + # -r requirements/base.txt + # jinja2-time attrs==21.2.0 # via pytest +backports.entry-points-selectable==1.1.0 + # via virtualenv binaryornot==0.4.4 - # via cookiecutter + # via + # -r requirements/base.txt + # cookiecutter bok_choy==0.7.1 # via -r requirements/test.in -boto3==1.17.78 - # via fs-s3fs boto==2.49.0 - # via -r requirements/base.in -botocore==1.20.78 + # via -r requirements/base.txt +boto3==1.18.54 # via + # -r requirements/base.txt + # fs-s3fs +botocore==1.21.54 + # via + # -r requirements/base.txt # boto3 # s3transfer -certifi==2020.12.5 - # via requests +certifi==2021.5.30 + # via + # -r requirements/base.txt + # requests chardet==4.0.0 # via + # -r requirements/base.txt # binaryornot +charset-normalizer==2.0.6 + # via + # -r requirements/base.txt # requests click==8.0.1 - # via cookiecutter + # via + # -r requirements/base.txt + # cookiecutter cookiecutter==1.7.3 - # via -r requirements/base.in -coverage[toml]==5.5 + # via -r requirements/base.txt +coverage[toml]==6.0 # via # -r requirements/test.in # pytest-cov -ddt==1.4.2 +ddt==1.4.4 # via -r requirements/test.in -distlib==0.3.1 +distlib==0.3.3 # via virtualenv -django-pyfs==3.0 - # via -r requirements/base.in # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/base.in + # -c requirements/common_constraints.txt + # -r requirements/base.txt # django-pyfs -filelock==3.0.12 +django-pyfs==3.1.0 + # via -r requirements/base.txt +filelock==3.3.0 # via # tox # virtualenv -fs-s3fs==1.1.1 - # via - # -r requirements/base.in - # django-pyfs fs==2.4.13 # via + # -r requirements/base.txt # django-pyfs # fs-s3fs # xblock -idna==2.10 - # via requests +fs-s3fs==1.1.1 + # via + # -r requirements/base.txt + # django-pyfs +idna==3.2 + # via + # -r requirements/base.txt + # requests iniconfig==1.1.1 # via pytest -jinja2-time==0.2.0 - # via cookiecutter -jinja2==3.0.1 +jinja2==3.0.2 # via + # -r requirements/base.txt # cookiecutter # jinja2-time +jinja2-time==0.2.0 + # via + # -r requirements/base.txt + # cookiecutter jmespath==0.10.0 # via + # -r requirements/base.txt # boto3 # botocore lazy==1.4 # via - # -r requirements/base.in + # -r requirements/base.txt # acid-xblock # bok-choy lxml==4.6.3 # via - # -r requirements/base.in + # -r requirements/base.txt # xblock -mako==1.1.4 +mako==1.1.5 # via acid-xblock markupsafe==2.0.1 # via + # -r requirements/base.txt # jinja2 # mako # xblock @@ -99,66 +124,79 @@ needle==0.5.0 # via bok-choy nose==1.3.7 # via needle -packaging==20.9 +packaging==21.0 # via # pytest # tox -pillow==8.2.0 +pillow==8.3.2 # via needle -pluggy==0.13.1 +platformdirs==2.4.0 + # via virtualenv +pluggy==1.0.0 # via # pytest # tox poyo==0.5.0 - # via cookiecutter + # via + # -r requirements/base.txt + # cookiecutter py==1.10.0 # via # pytest # tox pyparsing==2.4.7 # via packaging -pypng==0.0.20 - # via -r requirements/base.in -pytest-cov==2.12.0 - # via -r requirements/test.in -pytest-django==4.3.0 - # via -r requirements/test.in -pytest-rerunfailures==9.1.1 - # via -r requirements/test.in -pytest==6.2.4 +pypng==0.0.21 + # via -r requirements/base.txt +pytest==6.2.5 # via # pytest-cov # pytest-django # pytest-rerunfailures -python-dateutil==2.8.1 +pytest-cov==3.0.0 + # via -r requirements/test.in +pytest-django==4.4.0 + # via -r requirements/test.in +pytest-rerunfailures==10.2 + # via -r requirements/test.in +python-dateutil==2.8.2 # via + # -r requirements/base.txt # arrow # botocore # xblock python-slugify==5.0.2 - # via cookiecutter -pytz==2021.1 # via + # -r requirements/base.txt + # cookiecutter +pytz==2021.3 + # via + # -r requirements/base.txt # django # fs # xblock pyyaml==5.4.1 - # via xblock -requests==2.25.1 # via - # -r requirements/base.in + # -r requirements/base.txt + # xblock +requests==2.26.0 + # via + # -r requirements/base.txt # cookiecutter -s3transfer==0.4.2 - # via boto3 +s3transfer==0.5.0 + # via + # -r requirements/base.txt + # boto3 selenium==3.4.1 # via # -r requirements/test.in # bok-choy # needle -simplejson==3.17.2 - # via -r requirements/base.in +simplejson==3.17.5 + # via -r requirements/base.txt six==1.16.0 # via + # -r requirements/base.txt # bok-choy # cookiecutter # fs @@ -166,38 +204,44 @@ six==1.16.0 # python-dateutil # tox # virtualenv -sqlparse==0.4.1 - # via django +sqlparse==0.4.2 + # via + # -r requirements/base.txt + # django text-unidecode==1.3 - # via python-slugify + # via + # -r requirements/base.txt + # python-slugify toml==0.10.2 # via - # coverage # pytest # tox -tox-battery==0.6.1 - # via -r requirements/test.in -tox==3.23.1 +tomli==1.2.1 + # via coverage +tox==3.24.4 # via # -r requirements/test.in # tox-battery -urllib3==1.26.4 +tox-battery==0.6.1 + # via -r requirements/test.in +urllib3==1.26.7 # via + # -r requirements/base.txt # botocore # requests -virtualenv==20.4.6 +virtualenv==20.8.1 # via tox -web-fragments==1.0.0 +web-fragments==1.1.0 # via - # -r requirements/base.in + # -r requirements/base.txt # xblock webob==1.8.7 # via - # -r requirements/base.in + # -r requirements/base.txt # xblock -xblock==1.4.1 +xblock==1.5.1 # via - # -r requirements/base.in + # -r requirements/base.txt # acid-xblock # The following packages are considered to be unsafe in a requirements file: diff --git a/setup.py b/setup.py index 22082895..475f5dd4 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ def load_requirements(*requirements_paths): setup( name='xblock-sdk', - version='0.3.0', + version='0.4.0', description='XBlock SDK', packages=[ 'sample_xblocks', @@ -73,6 +73,9 @@ def load_requirements(*requirements_paths): 'Development Status :: 3 - Alpha', 'Framework :: Django', 'Framework :: Django :: 2.2', + 'Framework :: Django :: 3.0', + 'Framework :: Django :: 3.1', + 'Framework :: Django :: 3.2', '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 6102c6c2..8250051f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{22,30,31,32} +envlist = py38-django{22,30,31,32},quality [pycodestyle] exclude = .git,.tox,migrations diff --git a/workbench/blocks.py b/workbench/blocks.py index e5023014..5f3e86dc 100644 --- a/workbench/blocks.py +++ b/workbench/blocks.py @@ -16,7 +16,7 @@ class DebuggingChildBlock(XBlock): """A simple gray box, to use as a child placeholder.""" def fallback_view(self, view_name, context=None): # pylint: disable=W0613 """Provides a fallback view handler""" - frag = Fragment("
%s
%s
" % (make_safe_for_html(repr(self)), view_name)) + frag = Fragment(f"
{make_safe_for_html(repr(self))}
{view_name}
") frag.add_css(""" .debug_child { background-color: grey; diff --git a/workbench/settings.py b/workbench/settings.py index 1842a562..7acc7360 100644 --- a/workbench/settings.py +++ b/workbench/settings.py @@ -231,3 +231,4 @@ from .private import * # pylint: disable=wildcard-import,import-error,useless-suppression except ImportError: pass +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'