Skip to content

Commit

Permalink
feat: add python 3.11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
edx-requirements-bot authored and mumarkhan999 committed Apr 17, 2024
1 parent 803ba79 commit b7899cd
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 33 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, django32, django42]
python-version:
- '3.8'
- '3.12'
toxenv: [quality, docs, django42]
steps:
- uses: actions/checkout@v4
- name: setup python
Expand All @@ -39,4 +41,4 @@ jobs:
uses: codecov/codecov-action@v3
with:
flags: unittests
fail_ci_if_error: true
fail_ci_if_error: false
6 changes: 4 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#
asgiref==3.8.1
# via django
backports-zoneinfo==0.2.1
# via django
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
django==4.2.11
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.13.1
filelock==3.13.3
# via
# tox
# virtualenv
Expand Down
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@

# Common constraints for edx repos
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt

# For python greater than or equal to 3.9 backports.zoneinfo is causing failures
backports.zoneinfo;python_version<"3.9"
9 changes: 5 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ astroid==3.1.0
# -r requirements/quality.txt
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# django
build==1.1.1
build==1.2.1
# via
# -r requirements/pip-tools.txt
# pip-tools
Expand Down Expand Up @@ -77,7 +78,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 @@ -100,7 +101,7 @@ jinja2==3.1.3
# -r requirements/quality.txt
# code-annotations
# diff-cover
lxml==5.1.0
lxml==5.2.0
# via edx-i18n-tools
markupsafe==2.1.5
# via
Expand Down
5 changes: 3 additions & 2 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ babel==2.14.0
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
beautifulsoup4==4.12.3
Expand Down Expand Up @@ -63,7 +64,7 @@ jinja2==3.1.3
# via sphinx
markupsafe==2.1.5
# via jinja2
nh3==0.2.15
nh3==0.2.17
# via readme-renderer
packaging==24.0
# via
Expand Down
7 changes: 1 addition & 6 deletions requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
#
# make upgrade
#
build==1.1.1
build==1.2.1
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==6.11.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# build
packaging==24.0
# via build
pip-tools==7.4.1
# via -r requirements/pip-tools.in
Expand Down
3 changes: 2 additions & 1 deletion requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ astroid==3.1.0
# via
# pylint
# pylint-celery
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
click==8.1.7
Expand Down
3 changes: 2 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ asgiref==3.8.1
# via
# -r requirements/base.txt
# django
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# django
coverage[toml]==7.4.4
Expand Down
26 changes: 13 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[tox]
envlist = py38-django{32,42}, quality, docs
envlist = py{38, 312}-django{42}, quality, docs

[testenv]
deps =
django32: Django>=3.2,<4.0
deps =
django42: Django>=4.2,<4.3
-r{toxinidir}/requirements/test.txt
commands =
commands =
python -Wd -m pytest {posargs}

[testenv:docs]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
allowlist_externals =
allowlist_externals =
make
rm
deps =
deps =
-r{toxinidir}/requirements/doc.txt
twine
commands =
setuptools
commands =
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/xss_utils.rst
rm -f docs/modules.rst
Expand All @@ -29,21 +29,21 @@ commands =
twine check dist/*

[testenv:quality]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
allowlist_externals =
allowlist_externals =
make
rm
touch
deps =
deps =
-r{toxinidir}/requirements/quality.txt
commands =
setuptools
commands =
touch tests/__init__.py
pylint xss_utils tests tests_utils manage.py setup.py
rm tests/__init__.py
pycodestyle xss_utils tests manage.py setup.py
pydocstyle xss_utils tests manage.py setup.py
isort --check-only --diff tests test_utils xss_utils manage.py setup.py test_settings.py
make selfcheck

0 comments on commit b7899cd

Please sign in to comment.