Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

feat: add python312 support #598

Merged
merged 5 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ name: Python CI
on:
push:
branches:
- master
- master
pull_request:
branches:
- '**'
- '**'

jobs:
run_tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
python-version:
- 3.8
toxenv: [ django42 ]
os: [ubuntu-20.04]
python-version: ['3.8', '3.12']
toxenv: [django42]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand All @@ -44,11 +42,11 @@ jobs:
sudo apt install gettext
make static
make validate_translations
- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v4
with:
flags: unittests
file: ./coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Run Coverage
# if: matrix.python-version == '3.12' && matrix.toxenv=='django42'
# uses: codecov/codecov-action@v1
# with:
# flags: unittests
# file: ./coverage.xml
# fail_ci_if_error: true
# token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## re-compile requirements .txt files from .in files
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.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 --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
Expand Down
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ async-timeout==4.0.3
# via redis
backoff==1.10.0
# via analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# celery
# django
# djangorestframework
Expand Down Expand Up @@ -61,7 +62,6 @@ defusedxml==0.8.0rc2
django==4.2.14
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.in
# django-cors-headers
# django-crum
Expand Down
10 changes: 7 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
# Common constraints for edx repos
-c common_constraints.txt

# This constraint can be removed once global constraint is updated.
Django<4.3

# Version 3.2.0 contains bad arabic translations that will cause validation tests to fail
django-extensions<3.2.0

Expand Down Expand Up @@ -48,3 +45,10 @@ wrapt < 1.14.0

# At the time of adding this, the moto version 4.1.9 requires urllib3<1.27,>=1.25.4
urllib3<1.27,>=1.25.4

# backports.zoneinfo needed for Python 3.12 + Django 4.2 compatibility
# Can be removed once requirements have been upgraded with Python>=3.9
backports.zoneinfo; python_version<'3.9'

# path>16.14.0 has removed the deprecated abspath function, which is breaking the docs build
path<16.15.0
13 changes: 7 additions & 6 deletions requirements/devstack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ backoff==1.10.0
# via
# -r requirements/local.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/local.txt
# celery
# django
Expand All @@ -56,12 +57,12 @@ billiard==4.2.0
# via
# -r requirements/local.txt
# celery
boto3==1.34.149
boto3==1.34.150
# via
# -c requirements/constraints.txt
# -r requirements/local.txt
# moto
botocore==1.34.149
botocore==1.34.150
# via
# -r requirements/local.txt
# boto3
Expand Down Expand Up @@ -161,7 +162,6 @@ distlib==0.3.8
django==4.2.14
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/local.txt
# django-cors-headers
# django-crum
Expand Down Expand Up @@ -258,7 +258,7 @@ edx-django-utils==5.14.2
# edx-rest-api-client
edx-drf-extensions==10.3.0
# via -r requirements/local.txt
edx-i18n-tools==1.6.0
edx-i18n-tools==1.6.1
# via -r requirements/local.txt
edx-lint==5.3.7
# via -r requirements/local.txt
Expand Down Expand Up @@ -330,7 +330,7 @@ lxml[html-clean]==5.2.2
# -r requirements/local.txt
# edx-i18n-tools
# lxml-html-clean
lxml-html-clean==0.1.1
lxml-html-clean==0.2.0
# via
# -r requirements/local.txt
# lxml
Expand Down Expand Up @@ -376,6 +376,7 @@ packaging==24.1
# tox
path==16.14.0
# via
# -c requirements/constraints.txt
# -r requirements/local.txt
# edx-i18n-tools
pathspec==0.12.1
Expand Down
4 changes: 2 additions & 2 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ backoff==1.10.0
# via
# -r requirements/base.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# celery
# django
Expand Down Expand Up @@ -95,7 +96,6 @@ defusedxml==0.8.0rc2
django==4.2.14
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-cors-headers
# django-crum
Expand Down
16 changes: 9 additions & 7 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ backoff==1.10.0
# -r requirements/docs.txt
# -r requirements/test.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/docs.txt
# -r requirements/test.txt
# celery
Expand All @@ -64,12 +65,12 @@ billiard==4.2.0
# -r requirements/docs.txt
# -r requirements/test.txt
# celery
boto3==1.34.149
boto3==1.34.150
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# moto
botocore==1.34.149
botocore==1.34.150
# via
# -r requirements/test.txt
# boto3
Expand Down Expand Up @@ -177,7 +178,6 @@ distlib==0.3.8
django==4.2.14
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/docs.txt
# -r requirements/test.txt
# django-cors-headers
Expand Down Expand Up @@ -303,7 +303,7 @@ edx-drf-extensions==10.3.0
# via
# -r requirements/docs.txt
# -r requirements/test.txt
edx-i18n-tools==1.6.0
edx-i18n-tools==1.6.1
# via -r requirements/local.in
edx-lint==5.3.7
# via -r requirements/test.txt
Expand Down Expand Up @@ -381,7 +381,7 @@ lxml[html-clean,html_clean]==5.2.2
# via
# edx-i18n-tools
# lxml-html-clean
lxml-html-clean==0.1.1
lxml-html-clean==0.2.0
# via lxml
lz4==4.3.3
# via ruamel-yaml-cmd
Expand Down Expand Up @@ -425,7 +425,9 @@ packaging==24.1
# sphinx
# tox
path==16.14.0
# via edx-i18n-tools
# via
# -c requirements/constraints.txt
# edx-i18n-tools
pathspec==0.12.1
# via
# -r requirements/test.txt
Expand Down
10 changes: 5 additions & 5 deletions requirements/monitoring/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ backoff==1.10.0
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
Expand All @@ -84,14 +84,14 @@ billiard==4.2.0
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
# celery
boto3==1.34.149
boto3==1.34.150
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
# moto
botocore==1.34.149
botocore==1.34.150
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
Expand Down Expand Up @@ -410,7 +410,7 @@ edx-drf-extensions==10.3.0
# -r requirements/monitoring/../local.txt
# -r requirements/monitoring/../production.txt
# -r requirements/monitoring/../test.txt
edx-i18n-tools==1.6.0
edx-i18n-tools==1.6.1
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
Expand Down Expand Up @@ -534,7 +534,7 @@ lxml[html-clean]==5.2.2
# -r requirements/monitoring/../local.txt
# edx-i18n-tools
# lxml-html-clean
lxml-html-clean==0.1.1
lxml-html-clean==0.2.0
# via
# -r requirements/monitoring/../devstack.txt
# -r requirements/monitoring/../local.txt
Expand Down
4 changes: 2 additions & 2 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ wheel==0.43.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.1.2
pip==24.2
# via -r requirements/pip.in
setuptools==71.1.0
setuptools==72.1.0
# via -r requirements/pip.in
8 changes: 4 additions & 4 deletions requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ backoff==1.10.0
# via
# -r requirements/base.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# celery
# django
Expand All @@ -34,11 +35,11 @@ billiard==4.2.0
# via
# -r requirements/base.txt
# celery
boto3==1.34.149
boto3==1.34.150
# via
# -c requirements/constraints.txt
# -r requirements/production.in
botocore==1.34.149
botocore==1.34.150
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -93,7 +94,6 @@ defusedxml==0.8.0rc2
django==4.2.14
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-cors-headers
# django-crum
Expand Down
8 changes: 4 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ backoff==1.10.0
# via
# -r requirements/base.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# celery
# django
Expand All @@ -38,11 +39,11 @@ billiard==4.2.0
# via
# -r requirements/base.txt
# celery
boto3==1.34.149
boto3==1.34.150
# via
# -c requirements/constraints.txt
# moto
botocore==1.34.149
botocore==1.34.150
# via
# boto3
# moto
Expand Down Expand Up @@ -124,7 +125,6 @@ distlib==0.3.8
# via virtualenv
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# -r requirements/base.txt
# django-cors-headers
# django-crum
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[tox]
envlist = py38-django{42}
envlist = py{38, 312}-django{42}
skipsdist = true

[testenv]
passenv = *
deps =
deps =
setuptools
django42: -r requirements/django.txt
-r{toxinidir}/requirements/test.txt
allowlist_externals =
allowlist_externals =
i18n_tool
/bin/bash
commands = {posargs:pytest}
Loading