Skip to content

Commit

Permalink
feat: add python 3.11 and 3.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
edx-requirements-bot authored and awais786 committed Mar 30, 2024
1 parent 27914a2 commit 6a37f8c
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 13 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~

Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Configuration models for Django allowing config management with auditing.
"""

__version__ = '2.5.1'
__version__ = '2.6.0'
2 changes: 2 additions & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
Django # Web application framework
djangorestframework>=3.6
edx-django-utils
setuptools
wheel
4 changes: 2 additions & 2 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -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
7 changes: 5 additions & 2 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 6a37f8c

Please sign in to comment.