From 6a37f8c284c74355c5ee85a99aa0f74d58a454ed Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Fri, 23 Feb 2024 07:37:33 -0500 Subject: [PATCH] feat: add python 3.11 and 3.12 support --- .github/workflows/ci.yml | 7 +++++-- CHANGELOG.rst | 6 ++++++ Makefile | 7 ++++++- config_models/__init__.py | 2 +- requirements/base.in | 2 ++ requirements/ci.txt | 4 ++-- requirements/common_constraints.txt | 32 +++++++++++++++++++++++++++++ requirements/constraints.txt | 7 +++++-- tox.ini | 10 ++++----- 9 files changed, 64 insertions(+), 13 deletions(-) create mode 100644 requirements/common_constraints.txt 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/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/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 +