From e8178b9c7ff9ef1124691f9da40d09a1ba71a4ab Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Fri, 23 Feb 2024 07:37:44 -0500 Subject: [PATCH 1/2] feat: add python 3.11 support --- .github/workflows/ci.yml | 6 ++++-- imagemodal/mixins/fragment.py | 7 ++++++- requirements/base.txt | 20 +++++++++++--------- requirements/ci.txt | 6 +++--- requirements/common_constraints.txt | 11 ++++++++++- requirements/constraints.txt | 4 ++++ requirements/pip_tools.txt | 16 +++++++++------- requirements/tox.txt | 6 +++--- setup.py | 4 ++-- tox.ini | 14 ++++++-------- 10 files changed, 58 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a77de2..2c34339 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/imagemodal/mixins/fragment.py b/imagemodal/mixins/fragment.py index ed5091b..8418fe6 100644 --- a/imagemodal/mixins/fragment.py +++ b/imagemodal/mixins/fragment.py @@ -6,7 +6,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 + from xblock.fragment import Fragment # For backward compatibility with quince and earlier. class XBlockFragmentBuilderMixin: diff --git a/requirements/base.txt b/requirements/base.txt index 02d6a5a..e7f0e0e 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 @@ -41,11 +43,11 @@ sqlparse==0.4.4 # via django typing-extensions==4.10.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 ddd9c1e..53fbcda 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -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 194646a..3194c49 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,3 +10,7 @@ # This file contains all common constraints for edx-repos -c common_constraints.txt + + +# Temporary to Support the python 3.11 Upgrade +backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library 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/tox.txt b/requirements/tox.txt index e9a6490..cc5293d 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.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 1683269..c603f92 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import setup -version = '3.2.0' +version = '3.3.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: @@ -120,10 +120,10 @@ def is_requirement(line): 'Programming Language :: JavaScript', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', 'Topic :: Education', 'Topic :: Internet :: WWW/HTTP', 'Framework :: Django', - 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.2', ], test_suite='imagemodal.tests', diff --git a/tox.ini b/tox.ini index 7a7fa59..5ffa470 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 @@ -62,4 +61,3 @@ deps = transifex-client commands = tx push -s - From 792ff4e00e749fe1c2f005202e9de4e3534a11e7 Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Fri, 5 Apr 2024 05:46:47 -0400 Subject: [PATCH 2/2] chore: Updating Python Requirements --- requirements/pip.txt | 4 ++-- requirements/quality.txt | 22 +++++++++++++--------- requirements/test.txt | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-) 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/quality.txt b/requirements/quality.txt index dff01e5..de0f026 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -8,7 +8,7 @@ appdirs==1.4.4 # via # -r requirements/base.txt # fs -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # django @@ -17,6 +17,11 @@ astroid==3.1.0 # -r requirements/test.txt # pylint # pylint-celery +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # django click==8.1.7 # via # -r requirements/test.txt @@ -27,17 +32,17 @@ click-log==0.4.0 # via # -r requirements/test.txt # edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via # -r requirements/test.txt # edx-lint -coverage==7.4.3 +coverage==7.4.4 # via -r requirements/test.txt dill==0.3.8 # via # -r requirements/test.txt # pylint -django==3.2.24 +django==4.2.11 # via # -c requirements/common_constraints.txt # -r requirements/base.txt @@ -57,7 +62,7 @@ jinja2==3.1.3 # via # -r requirements/test.txt # code-annotations -lxml==5.1.0 +lxml==5.2.1 # via # -r requirements/base.txt # xblock @@ -113,7 +118,7 @@ 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 @@ -124,7 +129,6 @@ python-slugify==8.0.4 pytz==2024.1 # via # -r requirements/base.txt - # django # xblock pyyaml==6.0.1 # via @@ -172,7 +176,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 @@ -180,7 +184,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 cd6477e..d80b1d3 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -15,9 +15,9 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via edx-lint -coverage==7.4.3 +coverage==7.4.4 # via -r requirements/test.in dill==0.3.8 # via pylint