diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54e9c06..9e35200 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,11 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, docs, django32-drflatest, django42-drflatest, check_keywords] + python-version: + - '3.8' + - '3.11' + - '3.12' + toxenv: [quality, docs, django42-drflatest, check_keywords, django42] steps: - uses: actions/checkout@v4 - name: setup python diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d881a61..90bf5eb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,12 @@ Change Log .. There should always be an "Unreleased" section for changes pending release. +[2.6.0] - 2024-03-30 +~~~~~~~~~~~~~~~~~~~~ + +* Adding python3.11 and 3.12 support. + + [2.5.1] - 2023-09-22 ~~~~~~~~~~~~~~~~~~~~ diff --git a/Makefile b/Makefile index f0aa743..83ac6c2 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,13 @@ extract_translations: ## extract strings to be translated, outputting .mo files fake_translations: extract_translations dummy_translations compile_translations ## generate and compile dummy translation files +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: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in +upgrade: $(COMMON_CONSTRAINTS_TXT) # update the requirements/*.txt files with the latest packages satisfying requirements/*.in pip install -r requirements/pip-tools.txt pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in pip-compile --no-emit-trusted-host --no-emit-index-url --rebuild --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in diff --git a/config_models/__init__.py b/config_models/__init__.py index 0bf3af8..c6178ea 100644 --- a/config_models/__init__.py +++ b/config_models/__init__.py @@ -2,4 +2,4 @@ Configuration models for Django allowing config management with auditing. """ -__version__ = '2.5.1' +__version__ = '2.6.0' diff --git a/requirements/base.in b/requirements/base.in index 3590e8a..d223001 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -4,3 +4,5 @@ Django # Web application framework djangorestframework>=3.6 edx-django-utils +setuptools +wheel diff --git a/requirements/base.txt b/requirements/base.txt index ed1c59d..4693919 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,17 +4,20 @@ # # make upgrade # -asgiref==3.7.2 - # via django -backports-zoneinfo==0.2.1 +asgiref==3.8.1 # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django + # djangorestframework cffi==1.16.0 # via pynacl click==8.1.7 # via edx-django-utils -django==4.2.10 +django==4.2.11 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/common_constraints.txt # -r requirements/base.in # django-crum # django-waffle @@ -24,25 +27,28 @@ django-crum==0.7.9 # via edx-django-utils django-waffle==4.1.0 # via edx-django-utils -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via -r requirements/base.in -edx-django-utils==5.10.1 +edx-django-utils==5.12.0 # via -r requirements/base.in -newrelic==9.7.0 +newrelic==9.8.0 # via edx-django-utils pbr==6.0.0 # via stevedore psutil==5.9.8 # via edx-django-utils -pycparser==2.21 +pycparser==2.22 # via cffi pynacl==1.5.0 # via edx-django-utils -pytz==2024.1 - # via djangorestframework sqlparse==0.4.4 # via django stevedore==5.2.0 # via edx-django-utils typing-extensions==4.10.0 # via asgiref +wheel==0.43.0 + # via -r requirements/base.in + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/ci.txt b/requirements/ci.txt index 5a7df29..255b0e7 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -6,11 +6,11 @@ # 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 diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt new file mode 100644 index 0000000..e3bf8ea --- /dev/null +++ b/requirements/common_constraints.txt @@ -0,0 +1,32 @@ +# 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<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 +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 b231642..2496b99 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -8,5 +8,8 @@ # pin when possible. Writing an issue against the offending project and # 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 +# 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 \ No newline at end of file diff --git a/requirements/dev.txt b/requirements/dev.txt index 1adf8f0..f6f1347 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,7 +4,7 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/quality.txt # django @@ -13,11 +13,13 @@ astroid==3.1.0 # -r requirements/quality.txt # pylint # pylint-celery -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/quality.txt # django -build==1.1.1 + # djangorestframework +build==1.2.1 # via # -r requirements/pip-tools.txt # pip-tools @@ -38,11 +40,11 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via # -r requirements/quality.txt # edx-lint -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/quality.txt # pytest-cov @@ -56,9 +58,9 @@ distlib==0.3.8 # via # -r requirements/ci.txt # virtualenv -django==4.2.10 +django==4.2.11 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/common_constraints.txt # -r requirements/quality.txt # django-crum # django-waffle @@ -74,11 +76,11 @@ django-waffle==4.1.0 # via # -r requirements/quality.txt # edx-django-utils -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via -r requirements/quality.txt edx-django-release-util==1.3.0 # via -r requirements/quality.txt -edx-django-utils==5.10.1 +edx-django-utils==5.12.0 # via -r requirements/quality.txt edx-i18n-tools==1.3.0 # via -r requirements/dev.in @@ -88,15 +90,16 @@ exceptiongroup==1.2.0 # via # -r requirements/quality.txt # pytest -filelock==3.13.1 +filelock==3.13.3 # via # -r requirements/ci.txt # tox # virtualenv freezegun==1.4.0 # via -r requirements/quality.txt -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c requirements/common_constraints.txt # -r requirements/pip-tools.txt # build iniconfig==2.0.0 @@ -111,7 +114,7 @@ jinja2==3.1.3 # via # -r requirements/quality.txt # code-annotations -lxml==5.1.0 +lxml==5.1.1 # via edx-i18n-tools markupsafe==2.1.5 # via @@ -121,11 +124,11 @@ mccabe==0.7.0 # via # -r requirements/quality.txt # pylint -newrelic==9.7.0 +newrelic==9.8.0 # via # -r requirements/quality.txt # edx-django-utils -packaging==23.2 +packaging==24.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -139,7 +142,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 @@ -165,7 +168,7 @@ py==1.11.0 # tox pycodestyle==2.11.1 # via -r requirements/quality.txt -pycparser==2.21 +pycparser==2.22 # via # -r requirements/quality.txt # cffi @@ -200,12 +203,12 @@ pyproject-hooks==1.0.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.1.0 +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 @@ -217,10 +220,6 @@ python-slugify==8.0.4 # via # -r requirements/quality.txt # code-annotations -pytz==2024.1 - # via - # -r requirements/quality.txt - # djangorestframework pyyaml==6.0.1 # via # -r requirements/quality.txt @@ -284,11 +283,12 @@ virtualenv==20.25.1 # via # -r requirements/ci.txt # tox -wheel==0.42.0 +wheel==0.43.0 # via # -r requirements/pip-tools.txt + # -r requirements/quality.txt # pip-tools -zipp==3.17.0 +zipp==3.18.1 # via # -r requirements/pip-tools.txt # importlib-metadata diff --git a/requirements/doc.txt b/requirements/doc.txt index 5bbf071..9393424 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -8,7 +8,7 @@ accessible-pygments==0.0.4 # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/test.txt # django @@ -16,10 +16,12 @@ babel==2.14.0 # via # pydata-sphinx-theme # sphinx -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/test.txt # django + # djangorestframework beautifulsoup4==4.12.3 # via pydata-sphinx-theme certifi==2024.2.2 @@ -35,7 +37,7 @@ click==8.1.7 # via # -r requirements/test.txt # edx-django-utils -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/test.txt # pytest-cov @@ -43,9 +45,9 @@ cryptography==42.0.5 # via secretstorage ddt==1.7.2 # via -r requirements/test.txt -django==4.2.10 +django==4.2.11 # 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-crum # django-waffle @@ -60,7 +62,7 @@ django-waffle==4.1.0 # via # -r requirements/test.txt # edx-django-utils -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via -r requirements/test.txt docutils==0.19 # via @@ -69,7 +71,7 @@ docutils==0.19 # sphinx edx-django-release-util==1.3.0 # via -r requirements/test.txt -edx-django-utils==5.10.1 +edx-django-utils==5.12.0 # via -r requirements/test.txt exceptiongroup==1.2.0 # via @@ -81,12 +83,13 @@ idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c requirements/common_constraints.txt # keyring # sphinx # twine -importlib-resources==6.1.2 +importlib-resources==6.4.0 # via keyring iniconfig==2.0.0 # via @@ -94,13 +97,17 @@ iniconfig==2.0.0 # pytest jaraco-classes==3.3.1 # via keyring +jaraco-context==4.3.0 + # via keyring +jaraco-functools==4.0.0 + # via keyring jeepney==0.8.0 # via # keyring # secretstorage jinja2==3.1.3 # via sphinx -keyring==24.3.1 +keyring==25.0.0 # via twine markdown-it-py==3.0.0 # via rich @@ -109,14 +116,16 @@ markupsafe==2.1.5 mdurl==0.1.2 # via markdown-it-py more-itertools==10.2.0 - # via jaraco-classes -newrelic==9.7.0 + # via + # jaraco-classes + # jaraco-functools +newrelic==9.8.0 # via # -r requirements/test.txt # edx-django-utils -nh3==0.2.15 +nh3==0.2.17 # via readme-renderer -packaging==23.2 +packaging==24.0 # via # -r requirements/test.txt # pydata-sphinx-theme @@ -136,7 +145,7 @@ psutil==5.9.8 # via # -r requirements/test.txt # edx-django-utils -pycparser==2.21 +pycparser==2.22 # via # -r requirements/test.txt # cffi @@ -153,12 +162,12 @@ pynacl==1.5.0 # via # -r requirements/test.txt # edx-django-utils -pytest==8.1.0 +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 @@ -167,10 +176,7 @@ python-dateutil==2.9.0.post0 # -r requirements/test.txt # freezegun pytz==2024.1 - # via - # -r requirements/test.txt - # babel - # djangorestframework + # via babel pyyaml==6.0.1 # via # -r requirements/test.txt @@ -245,7 +251,9 @@ urllib3==2.2.1 # via # requests # twine -zipp==3.17.0 +wheel==0.43.0 + # via -r requirements/test.txt +zipp==3.18.1 # via # importlib-metadata # importlib-resources diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 8528adb..6401f54 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,15 +4,17 @@ # # make upgrade # -build==1.1.1 +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/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 499a56d..e7454c5 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -4,7 +4,7 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/test.txt # django @@ -12,10 +12,12 @@ astroid==3.1.0 # via # pylint # pylint-celery -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/test.txt # django + # djangorestframework cffi==1.16.0 # via # -r requirements/test.txt @@ -29,9 +31,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[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/test.txt # pytest-cov @@ -39,9 +41,9 @@ ddt==1.7.2 # via -r requirements/test.txt dill==0.3.8 # via pylint -django==4.2.10 +django==4.2.11 # 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-crum # django-waffle @@ -56,11 +58,11 @@ django-waffle==4.1.0 # via # -r requirements/test.txt # edx-django-utils -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via -r requirements/test.txt edx-django-release-util==1.3.0 # via -r requirements/test.txt -edx-django-utils==5.10.1 +edx-django-utils==5.12.0 # via -r requirements/test.txt edx-lint==5.3.6 # via -r requirements/quality.in @@ -82,11 +84,11 @@ markupsafe==2.1.5 # via jinja2 mccabe==0.7.0 # via pylint -newrelic==9.7.0 +newrelic==9.8.0 # via # -r requirements/test.txt # edx-django-utils -packaging==23.2 +packaging==24.0 # via # -r requirements/test.txt # pytest @@ -106,7 +108,7 @@ psutil==5.9.8 # edx-django-utils pycodestyle==2.11.1 # via -r requirements/quality.in -pycparser==2.21 +pycparser==2.22 # via # -r requirements/test.txt # cffi @@ -130,12 +132,12 @@ pynacl==1.5.0 # via # -r requirements/test.txt # edx-django-utils -pytest==8.1.0 +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 @@ -145,10 +147,6 @@ python-dateutil==2.9.0.post0 # freezegun python-slugify==8.0.4 # via code-annotations -pytz==2024.1 - # via - # -r requirements/test.txt - # djangorestframework pyyaml==6.0.1 # via # -r requirements/test.txt @@ -187,3 +185,5 @@ typing-extensions==4.10.0 # asgiref # astroid # pylint +wheel==0.43.0 + # via -r requirements/test.txt diff --git a/requirements/test.txt b/requirements/test.txt index a815fe9..00a376f 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,14 +4,16 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # django -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # django + # djangorestframework cffi==1.16.0 # via # -r requirements/base.txt @@ -20,12 +22,12 @@ click==8.1.7 # via # -r requirements/base.txt # edx-django-utils -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via pytest-cov 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 + # -c requirements/common_constraints.txt # -r requirements/base.txt # django-crum # django-waffle @@ -43,7 +45,7 @@ django-waffle==4.1.0 # via -r requirements/base.txt edx-django-release-util==1.3.0 # via -r requirements/test.in -edx-django-utils==5.10.1 +edx-django-utils==5.12.0 # via -r requirements/base.txt exceptiongroup==1.2.0 # via pytest @@ -51,11 +53,11 @@ freezegun==1.4.0 # via -r requirements/test.in iniconfig==2.0.0 # via pytest -newrelic==9.7.0 +newrelic==9.8.0 # via # -r requirements/base.txt # edx-django-utils -packaging==23.2 +packaging==24.0 # via pytest pbr==6.0.0 # via @@ -67,7 +69,7 @@ psutil==5.9.8 # via # -r requirements/base.txt # edx-django-utils -pycparser==2.21 +pycparser==2.22 # via # -r requirements/base.txt # cffi @@ -75,20 +77,16 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -pytest==8.1.0 +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.9.0.post0 # via freezegun -pytz==2024.1 - # via - # -r requirements/base.txt - # djangorestframework pyyaml==6.0.1 # via edx-django-release-util six==1.16.0 @@ -111,3 +109,5 @@ typing-extensions==4.10.0 # via # -r requirements/base.txt # asgiref +wheel==0.43.0 + # via -r requirements/base.txt diff --git a/tox.ini b/tox.ini index 8022436..fab4d44 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,42}-drf{latest},quality,docs +envlist = py{38, 311, 312}-django{42}-drf{latest},quality,docs [pycodestyle] exclude = .git,.tox,migrations @@ -18,7 +18,6 @@ setenv = PYTHONPATH = {toxinidir}/mock_apps DJANGO_SETTINGS_MODULE = test_settings deps = - django32: Django>=3.2,<4.0 django42: Django>=4.2,<4.3 drflatest: djangorestframework -r{toxinidir}/requirements/test.txt @@ -60,9 +59,10 @@ commands = make help [testenv:check_keywords] -whitelist_externals = +whitelist_externals = make -deps = +deps = -r{toxinidir}/requirements/test.txt -commands = +commands = make check_keywords +