Skip to content

Commit 6aeb1b2

Browse files
Andrew-Chen-Wangauvipyn2ygk
authored
Add support for Dj40, drop Py36 and Dj31 (#1039)
* Add support for Dj40, drop Py36 and Dj31 * Update tox.ini * remove python 3.10 from CI * Per django/django#15205 make minimum version of dj40 be 4.0.1. * Add py310 to GH test action. * Add back Python 3.10 and add Dj4.0.0 constraint * Installation should block 4.0.0 in my opinion to avoid anyone's production sit e from going down due to this package. This is only the case if someone runs mak emigrations on their production server (for any bad reason). * Updated docs to reflect the changes in this PR * Revert tox.ini Django 4.0.1 constraint * As of Dec 19, 2021, Django 4.0.1 has not released changes to fix a regression.It is a user-end regression that does not affect usability, but it does affect user's belief that they need to create a migration. In @Andrew-Chen-Wang's past experience, that has led to production errors and an emergency migration of one of his past packages... * Ignore dj310-djmain * Update CHANGELOG.md (only for user relevant changes). per https://django-oauth-toolkit.readthedocs.io/en/stable/contributing.html#pull-requests. Co-authored-by: Asif Saif Uddin <[email protected]> Co-authored-by: Alan Crosswell <[email protected]>
1 parent d25cb27 commit 6aeb1b2

File tree

6 files changed

+34
-50
lines changed

6 files changed

+34
-50
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fail-fast: false
1010
max-parallel: 5
1111
matrix:
12-
python-version: ['3.6', '3.7', '3.8', '3.9']
12+
python-version: ['3.7', '3.8', '3.9', '3.10']
1313

1414
steps:
1515
- uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,51 +16,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
## [Unreleased]
1818

19-
## [1.6.0] - 2021-12-14
19+
## [1.6.0] 2021-12-19
2020
### Added
21-
* #712, #636, #808. Calls to `django.contrib.auth.authenticate()` now pass a `request`
22-
to provide compatibility with backends that need one.
23-
* #950 Add support for RSA key rotation.
24-
* #968 Add support for Django 3.2
25-
* #949 Provide django.contrib.auth.authenticate() with a request for compatibiity with more backends.
26-
* #953 Allow loopback redirect URIs using ports as described in RFC8252
27-
* #972 Add Farsi/fa language support
28-
* #978 Multiple rsa keys
29-
* #967 OpenID: Add claims to Well know
30-
* #1019 #1024 #1026 #1030 #1033 #1036 [pre-commit.ci] pre-commit autoupdate
31-
* #1021 Jazzband: Synced file(s) with jazzband/.github
32-
* #1041 Admin: make extensive fields raw_id, add search fields
21+
* #949 Provide django.contrib.auth.authenticate() with a `request` for compatibiity with more backends (like django-axes).
22+
* #968, #1039 Add support for Django 3.2 and 4.0.
23+
* #953 Allow loopback redirect URIs using random ports as described in [RFC8252 section 7.3](https://datatracker.ietf.org/doc/html/rfc8252#section-7.3).
24+
* #972 Add Farsi/fa language support.
25+
* #978 OIDC: Add support for [rotating multiple RSA private keys](https://django-oauth-toolkit.readthedocs.io/en/latest/oidc.html#rotating-the-rsa-private-key).
26+
* #978 OIDC: Add new [OIDC_JWKS_MAX_AGE_SECONDS](https://django-oauth-toolkit.readthedocs.io/en/latest/settings.html#oidc-jwks-max-age-seconds) to improve `jwks_uri` caching.
27+
* #967 OIDC: Add [additional claims](https://django-oauth-toolkit.readthedocs.io/en/latest/oidc.html#adding-claims-to-the-id-token) beyond `sub` to the id_token.
28+
* #1041 Add a search field to the Admin UI (e.g. for search for tokens by email address).
3329

3430
### Changed
35-
* #1022 Replaced pkg_resources usage with importlib.metadata
36-
* #981 Require redirect_uri if multiple URIs are registered
37-
* #963 Handles ValueErrors with invalid hex values in query strings (#954)
38-
* #989 Change remaining HttpResponse to JsonResponse
39-
* #988 Optimize DB access in AccessTokenAdmin
40-
* #973 Use django-cors-headers in docs
41-
* #1009 Add missing space in assertion error
42-
* #1025 Moved version info from setup.cfg into package
43-
* #991 Update settings.rst with text
44-
* #956 doc: missing argument to get_userinfo_claims
45-
* #985 Documentation grammar
46-
* #977 doc: Add missing import
47-
* #1014 Update tutorial_03.rst to use arrays instead of tuples in the settings.py file
48-
49-
### Fixed
50-
* #948 Fix #524 - Restrict usage of timezone aware expire dates to Django projects with USE_TZ set to True
51-
* #957 Fix double oauth2_provider mountpoint in oidc view
52-
* #524 Restrict usage of timezone aware expire dates to Django projects with USE_TZ set to True.
53-
* #953 Allow loopback redirect URIs with random ports using http scheme, localhost address and no explicit port
54-
configuration in the allowed redirect_uris for Oauth2 Applications (RFC8252)
55-
* #954 Query strings with invalid hex values now raise a SuspiciousOperation exception
56-
* #955 Avoid doubling of `oauth2_provider` urls mountpath in json response for OIDC view `ConnectDiscoveryInfoView`.
57-
Breaks existing OIDC discovery output
31+
* #981 Require redirect_uri if multiple URIs are registered per [RFC6749 section 3.1.2.3](https://datatracker.ietf.org/doc/html/rfc6749#section-3.1.2.3)
32+
* #991 Update documentation of [REFRESH_TOKEN_EXPIRE_SECONDS](https://django-oauth-toolkit.readthedocs.io/en/latest/settings.html#refresh-token-expire-seconds) to indicate it may be `int` or `datetime.timedelta`.
33+
* #977 Update [Tutorial](https://django-oauth-toolkit.readthedocs.io/en/stable/tutorial/tutorial_01.html#) to show required `include`.
5834

5935
## Removed
60-
* #968 Remove support for Django 3.0
36+
* #968 Remove support for Django 3.0 & 3.1 and Python 3.6
6137
* #1035 Removes default_app_config for Django Deprecation Warning
6238
* #1023 six should be dropped
6339

40+
### Fixed
41+
* #963 Fix handling invalid hex values in client query strings with a 400 error rather than 500.
42+
* #973 [Tutorial](https://django-oauth-toolkit.readthedocs.io/en/latest/tutorial/tutorial_01.html#start-your-app) updated to use `django-cors-headers`.
43+
* #956 OIDC: Update documentation of [get_userinfo_claims](https://django-oauth-toolkit.readthedocs.io/en/latest/oidc.html#adding-information-to-the-userinfo-service) to add the missing argument.
44+
45+
6446
## [1.5.0] 2021-03-18
6547

6648
### Added

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Please report any security issues to the JazzBand security team at <security@jaz
4949
Requirements
5050
------------
5151

52-
* Python 3.6+
53-
* Django 2.2+
52+
* Python 3.7+
53+
* Django 2.2, 3.2, or >=4.0.1
5454
* oauthlib 3.1+
5555

5656
Installation

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ If you need help please submit a `question <https://github.com/jazzband/django-o
2121
Requirements
2222
------------
2323

24-
* Python 3.6+
25-
* Django 2.2+
24+
* Python 3.7+
25+
* Django 2.2, 3.2, 4.0.1+
2626
* oauthlib 3.1+
2727

2828
Index

setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ classifiers =
1313
Environment :: Web Environment
1414
Framework :: Django
1515
Framework :: Django :: 2.2
16-
Framework :: Django :: 3.1
1716
Framework :: Django :: 3.2
17+
Framework :: Django :: 4.0
1818
Intended Audience :: Developers
1919
License :: OSI Approved :: BSD License
2020
Operating System :: OS Independent
2121
Programming Language :: Python :: 3
22-
Programming Language :: Python :: 3.6
2322
Programming Language :: Python :: 3.7
2423
Programming Language :: Python :: 3.8
2524
Programming Language :: Python :: 3.9
25+
Programming Language :: Python :: 3.10
2626
Topic :: Internet :: WWW/HTTP
2727

2828
[options]
@@ -32,7 +32,7 @@ zip_safe = False
3232
# jwcrypto has a direct dependency on six, but does not list it yet in a release
3333
# Previously, cryptography also depended on six, so this was unnoticed
3434
install_requires =
35-
django >= 2.2
35+
django >= 2.2, != 4.0.0
3636
requests >= 2.13.0
3737
oauthlib >= 3.1.0
3838
jwcrypto >= 0.8.0

tox.ini

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
envlist =
33
flake8,
44
docs,
5-
py{36,37,38,39}-dj{32,31,22},
6-
py{38,39}-djmain,
5+
py{37,38,39}-dj22,
6+
py{37,38,39,310}-dj32,
7+
py{38,39,310}-dj40,
8+
py{38,39,310}-djmain,
79

810
[gh-actions]
911
python =
10-
3.6: py36
1112
3.7: py37
1213
3.8: py38, docs, flake8
1314
3.9: py39
15+
3.10: py310
1416

1517
[pytest]
1618
django_find_project = false
@@ -33,8 +35,8 @@ setenv =
3335
PYTHONWARNINGS = all
3436
deps =
3537
dj22: Django>=2.2,<3
36-
dj31: Django>=3.1,<3.2
3738
dj32: Django>=3.2,<3.3
39+
dj40: Django>=4.0.0,<4.1
3840
djmain: https://github.com/django/django/archive/main.tar.gz
3941
djangorestframework
4042
oauthlib>=3.1.0
@@ -49,7 +51,7 @@ deps =
4951
passenv =
5052
PYTEST_ADDOPTS
5153

52-
[testenv:py{38,39}-djmain]
54+
[testenv:py{38,39,310}-djmain]
5355
ignore_errors = true
5456
ignore_outcome = true
5557

0 commit comments

Comments
 (0)