Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding python3.11 support. #85

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, pii_check, django32, django40]
python-version: ['3.8', '3.11']
toxenv: [quality, pii_check, django42]

steps:
- uses: actions/checkout@v2
Expand All @@ -37,7 +37,7 @@ jobs:
run: tox

- name: Run coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'django32'
if: matrix.python-version == '3.8' && matrix.toxenv == 'django42'
uses: codecov/codecov-action@v2
with:
flags: unittests
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ Change Log
Unreleased
**********

*
[0.3.0] - 2024-04-09
************************************************

Added
=====

* Adding python 3.11 support. Dropped django32 support.

[0.2.1] - 2022-12-16
************************************************
Expand Down
8 changes: 5 additions & 3 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
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
Expand All @@ -30,7 +32,7 @@ six==1.16.0
# via pyjwkest
sqlparse==0.4.4
# via django
typing-extensions==4.10.0
typing-extensions==4.11.0
# via asgiref
urllib3==2.2.1
# via requests
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

# Temporary to Support the python 3.11 Upgrade
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library
11 changes: 6 additions & 5 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ 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.2.1
Expand Down Expand Up @@ -50,7 +51,7 @@ click-log==0.4.0
# via
# -r requirements/quality.txt
# edx-lint
code-annotations==1.7.0
code-annotations==1.8.0
# via
# -r requirements/quality.txt
# edx-lint
Expand Down Expand Up @@ -116,7 +117,7 @@ jinja2==3.1.3
# -r requirements/quality.txt
# code-annotations
# diff-cover
lxml==5.2.0
lxml==5.2.1
# via edx-i18n-tools
markupsafe==2.1.5
# via
Expand All @@ -135,7 +136,7 @@ packaging==24.0
# pyproject-api
# pytest
# tox
path==16.10.0
path==16.14.0
# via edx-i18n-tools
pbr==6.0.0
# via
Expand Down Expand Up @@ -262,7 +263,7 @@ tomlkit==0.12.4
# pylint
tox==4.14.2
# via -r requirements/ci.txt
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# -r requirements/quality.txt
# asgiref
Expand Down
11 changes: 7 additions & 4 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ asgiref==3.8.1
# django
babel==2.14.0
# via sphinx
backports-zoneinfo==0.2.1
backports-tarfile==1.0.0
# via jaraco-context
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# django
build==1.2.1
Expand All @@ -32,7 +35,7 @@ click==8.1.7
# via
# -r requirements/test.txt
# code-annotations
code-annotations==1.7.0
code-annotations==1.8.0
# via -r requirements/test.txt
coverage[toml]==7.4.4
# via
Expand Down Expand Up @@ -81,7 +84,7 @@ iniconfig==2.0.0
# pytest
jaraco-classes==3.4.0
# via keyring
jaraco-context==4.3.0
jaraco-context==5.3.0
# via keyring
jaraco-functools==4.0.0
# via keyring
Expand Down Expand Up @@ -223,7 +226,7 @@ tomli==2.0.1
# pytest
twine==5.0.0
# via -r requirements/doc.in
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# -r requirements/test.txt
# asgiref
Expand Down
7 changes: 4 additions & 3 deletions 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
certifi==2024.2.2
Expand All @@ -32,7 +33,7 @@ click==8.1.7
# edx-lint
click-log==0.4.0
# via edx-lint
code-annotations==1.7.0
code-annotations==1.8.0
# via
# -r requirements/test.txt
# edx-lint
Expand Down Expand Up @@ -164,7 +165,7 @@ tomli==2.0.1
# pytest
tomlkit==0.12.4
# via pylint
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# -r requirements/test.txt
# asgiref
Expand Down
7 changes: 4 additions & 3 deletions 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
certifi==2024.2.2
Expand All @@ -22,7 +23,7 @@ charset-normalizer==3.3.2
# requests
click==8.1.7
# via code-annotations
code-annotations==1.7.0
code-annotations==1.8.0
# via -r requirements/test.in
coverage[toml]==7.4.4
# via pytest-cov
Expand Down Expand Up @@ -89,7 +90,7 @@ tomli==2.0.1
# via
# coverage
# pytest
typing-extensions==4.10.0
typing-extensions==4.11.0
# via
# -r requirements/base.txt
# asgiref
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ def is_requirement(line):
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: Django',
'Framework :: Django :: 3.2',
'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',
],
)
2 changes: 1 addition & 1 deletion token_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
App for the creation, signing, and decoding of various access tokens.
"""

__version__ = '0.2.1'
__version__ = '0.3.0'

default_app_config = 'token_utils.apps.TokenUtilsConfig' # pylint: disable=invalid-name
29 changes: 14 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}
envlist = py38-django{42}

[doc8]
; D001 = Line too long
Expand Down Expand Up @@ -35,26 +35,25 @@ addopts = --cov token_utils --cov-report term-missing --cov-report xml
norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
deps =
django40: Django>=4.2,<4.3
-r{toxinidir}/requirements/test.txt
commands =
commands =
python manage.py check
pytest {posargs}

[testenv:docs]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = test_settings
PYTHONPATH = {toxinidir}
# Adding the option here instead of as a default in the docs Makefile because that Makefile is generated by shpinx.
SPHINXOPTS = -W
allowlist_externals =
allowlist_externals =
make
rm
deps =
deps =
-r{toxinidir}/requirements/doc.txt
commands =
commands =
doc8 --ignore-path docs/_build README.rst docs
rm -f docs/token_utils.rst
rm -f docs/modules.rst
Expand All @@ -64,13 +63,13 @@ commands =
twine check dist/*

[testenv:quality]
allowlist_externals =
allowlist_externals =
make
rm
touch
deps =
deps =
-r{toxinidir}/requirements/quality.txt
commands =
commands =
touch tests/__init__.py
pylint token_utils tests test_utils manage.py setup.py
rm tests/__init__.py
Expand All @@ -80,10 +79,10 @@ commands =
make selfcheck

[testenv:pii_check]
setenv =
setenv =
DJANGO_SETTINGS_MODULE = test_settings
deps =
deps =
-r{toxinidir}/requirements/test.txt
commands =
commands =
code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage

Loading