Skip to content

Commit

Permalink
Merge pull request #259 from openedx/python-support
Browse files Browse the repository at this point in the history
Python support 3.11 and 3.12
  • Loading branch information
Feanil Patel authored Apr 2, 2024
2 parents cc3eb3a + 192e3c3 commit ae26c18
Show file tree
Hide file tree
Showing 16 changed files with 200 additions and 132 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.8"]
python-version: ["3.8", "3.11", "3.12"]
toxenv:
[
py38-django32-drf312,
py38-django32-drflatest,
py38-django42-drflatest,
quality,
py38-django42-drflatest,quality
]

steps:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Change Log
Unreleased
----------

1.8.0 --- 2024-02-29
--------------------
* Add support for python 3.11 and 3.12 support.
* Removed django32 support.



1.7.0 --- 2023-07-23
--------------------

Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,22 @@ pip:
upgrade-pip-tools: pip-tools
pip-compile --upgrade requirements/pip-tools.in

define COMMON_CONSTRAINTS_TEMP_COMMENT
# This is a temporary solution to override the real common_constraints.txt\n# In edx-lint, until the pyjwt constraint in edx-lint has been removed.\n# See BOM-2721 for more details.\n# Below is the copied and edited version of common_constraints\n
endef

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 "$(@)"
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

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
# Make sure to compile files after any other files they include!
pip install -qr requirements/pip-tools.txt
sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip install -qr requirements/pip-tools.txt
Expand Down
2 changes: 1 addition & 1 deletion edx_api_doc_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
)


__version__ = '1.7.0'
__version__ = '1.8.0'
20 changes: 11 additions & 9 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@
#
# make upgrade
#
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 https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/constraints.txt
# django
# djangorestframework
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
# djangorestframework
# drf-yasg
djangorestframework==3.14.0
djangorestframework==3.15.1
# via
# -r requirements/base.in
# drf-yasg
drf-yasg==1.21.7
# via -r requirements/base.in
inflection==0.5.1
# via drf-yasg
packaging==23.2
packaging==24.0
# via drf-yasg
pytz==2024.1
# via
# django
# djangorestframework
# drf-yasg
# via drf-yasg
pyyaml==6.0.1
# via drf-yasg
sqlparse==0.4.4
Expand Down
6 changes: 3 additions & 3 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,7 +32,7 @@ tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.13.0
tox==4.14.2
# via -r requirements/ci.in
virtualenv==20.25.1
# via tox
38 changes: 38 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-2721 for more details.
# Below is the copied and edited version of common_constraints

# 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

4 changes: 3 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
# 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
-c common_constraints.txt

backports.zoneinfo;python_version<"3.9"
71 changes: 36 additions & 35 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
asgiref==3.7.2
asgiref==3.8.1
# via
# -r requirements/quality.txt
# django
Expand All @@ -13,7 +13,13 @@ astroid==3.1.0
# -r requirements/quality.txt
# pylint
# pylint-celery
build==1.0.3
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# django
# djangorestframework
build==1.2.1
# via
# -r requirements/pip-tools.txt
# pip-tools
Expand All @@ -25,10 +31,6 @@ certifi==2024.2.2
# via
# -r requirements/quality.txt
# requests
cffi==1.16.0
# via
# -r requirements/quality.txt
# cryptography
chardet==5.2.0
# via
# -r requirements/ci.txt
Expand All @@ -50,15 +52,15 @@ 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
colorama==0.4.6
# via
# -r requirements/ci.txt
# tox
coverage[toml]==7.4.3
coverage[toml]==7.4.4
# via
# -r requirements/quality.txt
# pytest-cov
Expand All @@ -76,14 +78,14 @@ distlib==0.3.8
# via
# -r requirements/ci.txt
# virtualenv
django==3.2.24
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
# djangorestframework
# drf-yasg
# edx-i18n-tools
djangorestframework==3.14.0
djangorestframework==3.15.1
# via
# -r requirements/quality.txt
# drf-yasg
Expand All @@ -101,7 +103,7 @@ exceptiongroup==1.2.0
# via
# -r requirements/quality.txt
# pytest
filelock==3.13.1
filelock==3.13.3
# via
# -r requirements/ci.txt
# tox
Expand All @@ -110,14 +112,15 @@ idna==3.6
# via
# -r requirements/quality.txt
# requests
importlib-metadata==7.0.1
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
# build
# keyring
# twine
importlib-resources==6.1.2
importlib-resources==6.4.0
# via
# -r requirements/quality.txt
# keyring
Expand All @@ -133,25 +136,28 @@ isort==5.13.2
# via
# -r requirements/quality.txt
# pylint
jaraco-classes==3.3.1
jaraco-classes==3.4.0
# via
# -r requirements/quality.txt
# keyring
jeepney==0.8.0
jaraco-context==4.3.0
# via
# -r requirements/quality.txt
# keyring
jaraco-functools==4.0.0
# via
# -r requirements/quality.txt
# keyring
# secretstorage
jinja2==3.1.3
# via
# -r requirements/quality.txt
# code-annotations
# diff-cover
keyring==24.3.1
keyring==25.0.0
# via
# -r requirements/quality.txt
# twine
lxml==5.1.0
lxml==5.2.0
# via edx-i18n-tools
markdown-it-py==3.0.0
# via
Expand All @@ -173,11 +179,12 @@ more-itertools==10.2.0
# via
# -r requirements/quality.txt
# jaraco-classes
nh3==0.2.15
# jaraco-functools
nh3==0.2.17
# via
# -r requirements/quality.txt
# readme-renderer
packaging==23.2
packaging==24.0
# via
# -r requirements/ci.txt
# -r requirements/pip-tools.txt
Expand All @@ -193,9 +200,9 @@ 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
pkginfo==1.9.6
pkginfo==1.10.0
# via
# -r requirements/quality.txt
# twine
Expand All @@ -217,7 +224,7 @@ polib==1.2.0
# via edx-i18n-tools
pycodestyle==2.11.1
# via -r requirements/quality.txt
pycparser==2.21
pycparser==2.22
# via
# -r requirements/quality.txt
# cffi
Expand Down Expand Up @@ -258,12 +265,12 @@ pyproject-hooks==1.0.0
# -r requirements/pip-tools.txt
# build
# pip-tools
pytest==8.0.2
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
Expand All @@ -274,8 +281,6 @@ python-slugify==8.0.4
pytz==2024.1
# via
# -r requirements/quality.txt
# django
# djangorestframework
# drf-yasg
pyyaml==6.0.1
# via
Expand Down Expand Up @@ -304,10 +309,6 @@ rich==13.7.1
# via
# -r requirements/quality.txt
# twine
secretstorage==3.3.3
# via
# -r requirements/quality.txt
# keyring
six==1.16.0
# via
# -r requirements/quality.txt
Expand Down Expand Up @@ -345,7 +346,7 @@ tomlkit==0.12.4
# via
# -r requirements/quality.txt
# pylint
tox==4.13.0
tox==4.14.2
# via -r requirements/ci.txt
twine==5.0.0
# via -r requirements/quality.txt
Expand All @@ -369,11 +370,11 @@ virtualenv==20.25.1
# via
# -r requirements/ci.txt
# tox
wheel==0.42.0
wheel==0.43.0
# via
# -r requirements/pip-tools.txt
# pip-tools
zipp==3.17.0
zipp==3.18.1
# via
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
Expand Down
Loading

0 comments on commit ae26c18

Please sign in to comment.