diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f96490a2..dc44ef57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,10 @@ name: Python CI on: push: branches: - - master + - master pull_request: branches: - - '**' + - '**' jobs: run_tests: @@ -14,15 +14,13 @@ jobs: 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 @@ -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 }} diff --git a/Makefile b/Makefile index e5d30f20..2e93f5b3 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/requirements/base.txt b/requirements/base.txt index a96f7345..3f353f37 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -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 @@ -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 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 9f837379..9e40c380 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -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 @@ -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 diff --git a/requirements/devstack.txt b/requirements/devstack.txt index 067357d9..1932bf8a 100644 --- a/requirements/devstack.txt +++ b/requirements/devstack.txt @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/requirements/docs.txt b/requirements/docs.txt index ad9f539b..1d5bcf80 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -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 @@ -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 diff --git a/requirements/local.txt b/requirements/local.txt index a64e172c..46c62655 100644 --- a/requirements/local.txt +++ b/requirements/local.txt @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/requirements/monitoring/requirements.txt b/requirements/monitoring/requirements.txt index 8579e57e..b4d0257f 100644 --- a/requirements/monitoring/requirements.txt +++ b/requirements/monitoring/requirements.txt @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/requirements/pip.txt b/requirements/pip.txt index ebe14bbe..7b187b8d 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -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 diff --git a/requirements/production.txt b/requirements/production.txt index d9784c9a..b5f4d7ab 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -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 @@ -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 @@ -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 diff --git a/requirements/test.txt b/requirements/test.txt index 9bbc7f5e..4070a346 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -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 @@ -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 @@ -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 diff --git a/tox.ini b/tox.ini index 6f5406a3..a8591756 100644 --- a/tox.ini +++ b/tox.ini @@ -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}