diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e6c687..17f7d6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,10 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [django32, django42, quality, csslint, eslint] + python-version: + - '3.8' + - '3.11' + toxenv: [django42, quality, csslint, eslint] steps: - uses: actions/checkout@v2 diff --git a/qualtricssurvey/mixins/fragment.py b/qualtricssurvey/mixins/fragment.py index 34c99e2..e69bc95 100644 --- a/qualtricssurvey/mixins/fragment.py +++ b/qualtricssurvey/mixins/fragment.py @@ -8,7 +8,12 @@ from django.template.context import Context from xblock.core import XBlock -from xblock.fragment import Fragment + +try: + from web_fragments.fragment import Fragment +except Exception: # pylint: disable=broad-except + # For backward compatibility with quince and earlier. + from xblock.fragment import Fragment class XBlockFragmentBuilderMixin: diff --git a/requirements/base.txt b/requirements/base.txt index 3c1958d..0634aad 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,15 +6,19 @@ # appdirs==1.4.4 # via fs -asgiref==3.7.2 +asgiref==3.8.1 # via django -django==3.2.24 +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django +django==4.2.11 # via # -c requirements/common_constraints.txt # -r requirements/base.in fs==2.4.16 # via xblock -lxml==5.1.0 +lxml==5.2.1 # via xblock mako==1.3.2 # via xblock @@ -22,12 +26,10 @@ markupsafe==2.1.5 # via # mako # xblock -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via xblock pytz==2024.1 - # via - # django - # xblock + # via xblock pyyaml==6.0.1 # via xblock simplejson==3.19.2 @@ -38,13 +40,13 @@ six==1.16.0 # python-dateutil sqlparse==0.4.4 # via django -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via asgiref -web-fragments==2.1.0 +web-fragments==2.2.0 # via xblock webob==1.8.7 # via xblock -xblock==1.10.0 +xblock==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 4987c48..53fbcda 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.3.2 +cachetools==5.3.3 # via # -r requirements/tox.txt # tox @@ -30,14 +30,14 @@ distlib==0.3.8 # virtualenv docopt==0.6.2 # via coveralls -filelock==3.13.1 +filelock==3.13.3 # via # -r requirements/tox.txt # tox # virtualenv idna==3.6 # via requests -packaging==23.2 +packaging==24.0 # via # -r requirements/tox.txt # pyproject-api @@ -62,7 +62,7 @@ tomli==2.0.1 # -r requirements/tox.txt # pyproject-api # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/tox.txt urllib3==2.2.1 # via requests diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 15aafb2..e3bf8ea 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -13,7 +13,7 @@ # using LTS django version -Django<4.0 +Django<5.0 # 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 @@ -21,3 +21,12 @@ elasticsearch<7.14.0 # django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected django-simple-history==3.0.0 + +# opentelemetry requires version 6.x at the moment: +# https://github.com/open-telemetry/opentelemetry-python/issues/3570 +# Normally this could be added as a constraint in edx-django-utils, where we're +# adding the opentelemetry dependency. However, when we compile pip-tools.txt, +# that uses version 7.x, and then there's no undoing that when compiling base.txt. +# So we need to pin it globally, for now. +# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407 +importlib-metadata<7 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 7183faf..be24b48 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -12,3 +12,5 @@ -c common_constraints.txt # TODO: Many pinned dependencies should be unpinned and/or moved to this constraints file. +# Temporary to Support the python 3.11 Upgrade +backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library \ No newline at end of file diff --git a/requirements/pip.txt b/requirements/pip.txt index 6665603..cf44902 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.2.0 # via -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index fb84d10..4e1105e 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 requirements/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/quality.txt b/requirements/quality.txt index ea520aa..bf48d2c 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -8,17 +8,22 @@ appdirs==1.4.4 # via # -r requirements/base.txt # fs -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # django astroid==3.1.0 # via pylint -coverage==7.4.3 +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # django +coverage==7.4.4 # via -r requirements/test.txt dill==0.3.8 # via pylint -django==3.2.24 +django==4.2.11 # via # -c requirements/common_constraints.txt # -r requirements/base.txt @@ -30,7 +35,7 @@ fs==2.4.16 # xblock isort==5.13.2 # via pylint -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/base.txt # xblock @@ -61,14 +66,13 @@ pymongo==3.13.0 # via # -r requirements/test.txt # edx-opaque-keys -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/base.txt # xblock pytz==2024.1 # via # -r requirements/base.txt - # django # xblock pyyaml==6.0.1 # via @@ -93,9 +97,9 @@ stevedore==5.2.0 # edx-opaque-keys tomli==2.0.1 # via pylint -tomlkit==0.12.3 +tomlkit==0.12.4 # via pylint -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via # -r requirements/base.txt # -r requirements/test.txt @@ -103,7 +107,7 @@ typing-extensions==4.10.0 # astroid # edx-opaque-keys # pylint -web-fragments==2.1.0 +web-fragments==2.2.0 # via # -r requirements/base.txt # xblock @@ -111,7 +115,7 @@ webob==1.8.7 # via # -r requirements/base.txt # xblock -xblock==1.10.0 +xblock==3.1.0 # via -r requirements/base.txt # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/test.txt b/requirements/test.txt index f75e76d..569ce26 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,7 +4,7 @@ # # make upgrade # -coverage==7.4.3 +coverage==7.4.4 # via -r requirements/test.in edx-opaque-keys==2.5.1 # via -r requirements/test.in @@ -16,5 +16,5 @@ pymongo==3.13.0 # via edx-opaque-keys stevedore==5.2.0 # via edx-opaque-keys -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via edx-opaque-keys diff --git a/requirements/tox.txt b/requirements/tox.txt index 9a12d68..cc5293d 100644 --- a/requirements/tox.txt +++ b/requirements/tox.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.3 # 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/tox.in virtualenv==20.25.1 # via tox diff --git a/setup.py b/setup.py index a973f8b..7e610e6 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import find_packages, setup -version = '1.4.0' +version = '1.5.0' description = __doc__.strip().split('\n')[0] this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.rst')) as file_in: @@ -119,8 +119,8 @@ def is_requirement(line): 'Programming Language :: Python', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', 'Framework :: Django', - 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.2', 'Topic :: Education', 'Topic :: Internet :: WWW/HTTP', diff --git a/tox.ini b/tox.ini index 21e64e9..c840a57 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,8 @@ [tox] -envlist = csslint,eslint,py38-django{32,42},quality +envlist = csslint,eslint,py{38, 311}-django{42},quality [testenv] deps = - django32: Django>=3.2,<4.0 django42: Django>=4.2,<4.3 -rrequirements/test.txt commands = @@ -19,10 +18,10 @@ deps = skip_install = True [testenv:csslint] -allowlist_externals = +allowlist_externals = make {toxinidir}/node_modules/csslint/dist/cli.js -passenv = +passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH @@ -33,10 +32,10 @@ deps = skip_install = True [testenv:eslint] -allowlist_externals = +allowlist_externals = make {toxinidir}/node_modules/eslint/bin/eslint.js -passenv = +passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH @@ -47,7 +46,7 @@ deps = skip_install = True [testenv:quality] -passenv = +passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH