diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8fc968..584865f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,11 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, docs, django32, django42] + python-version: + - '3.8' + - '3.11' + - '3.12' + toxenv: [quality, docs, django42] steps: - uses: actions/checkout@v4 - name: setup python @@ -36,7 +39,8 @@ jobs: - name: Run coverage if: matrix.python-version == '3.8' && matrix.toxenv == 'django42' - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: flags: unittests - fail_ci_if_error: true + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 59b7a78..640f683 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,7 @@ Change Log in this file. It adheres to the structure of http://keepachangelog.com/ , but in reStructuredText instead of Markdown (for ease of incorporation into Sphinx documentation and the PyPI description). - + This project adheres to Semantic Versioning (http://semver.org/). .. There should always be an "Unreleased" section for changes pending release. @@ -14,6 +14,11 @@ Change Log Unreleased ~~~~~~~~~~ +[0.6.0] - 2024-04-22 +~~~~~~~~~~~~~~~~~~~~ + +* Test and declare Python 3.11 and 3.12 compatibility. + [0.5.0] - 2023-08-01 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -21,7 +26,7 @@ Unreleased deprecated. See https://github.com/openedx/edx-sphinx-theme/issues/184 for more details. * Added supportt for Django 4.2 - + [0.4.0] - 2022-01-20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/requirements/base.txt b/requirements/base.txt index c0b4661..f902be3 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -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 diff --git a/requirements/ci.txt b/requirements/ci.txt index c9dd749..c085cbc 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -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 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index d91704b..2d27179 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -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" diff --git a/requirements/dev.txt b/requirements/dev.txt index c040252..758a734 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -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 @@ -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 @@ -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 diff --git a/requirements/doc.txt b/requirements/doc.txt index 97916e5..23788b7 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -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 @@ -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 diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index aad9d38..a065a69 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -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 diff --git a/requirements/quality.txt b/requirements/quality.txt index 007a603..1d0ddfc 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -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 diff --git a/requirements/test.txt b/requirements/test.txt index e769e43..e58f62d 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -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 diff --git a/setup.py b/setup.py index 7709345..08edab9 100644 --- a/setup.py +++ b/setup.py @@ -122,12 +122,13 @@ def is_requirement(line): classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], ) diff --git a/tox.ini b/tox.ini index 5894f0c..5c3b93c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,25 +1,26 @@ [tox] -envlist = py38-django{32,42}, quality, docs +envlist = py{38, 311, 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 + wheel +commands = doc8 --ignore-path docs/_build README.rst docs rm -f docs/xss_utils.rst rm -f docs/modules.rst @@ -29,16 +30,17 @@ 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 @@ -46,4 +48,3 @@ commands = 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 - diff --git a/xss_utils/__init__.py b/xss_utils/__init__.py index 4f9065c..af342e3 100644 --- a/xss_utils/__init__.py +++ b/xss_utils/__init__.py @@ -1,4 +1,4 @@ """ Utilities to prevent possible XSS attacks on Django/Mako templates.. """ -__version__ = '0.5.1' +__version__ = '0.6.0'