Skip to content

Commit 236c737

Browse files
authored
Added support for Python 3.11 (#1096)
1 parent 81f4fe2 commit 236c737

File tree

7 files changed

+16
-7
lines changed

7 files changed

+16
-7
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ["3.7", "3.8", "3.9", "3.10"]
11+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1212
env:
1313
PYTHON: ${{ matrix.python-version }}
1414
steps:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ any parts of the framework not mentioned in the documentation should generally b
1010

1111
## [Unreleased]
1212

13+
### Added
14+
15+
* Added support for Python 3.11.
16+
1317
## [6.0.0] - 2022-09-24
1418

1519
### Fixed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ As a Django REST framework JSON:API (short DJA) we are trying to address followi
8888
Requirements
8989
------------
9090

91-
1. Python (3.7, 3.8, 3.9, 3.10)
91+
1. Python (3.7, 3.8, 3.9, 3.10, 3.11)
9292
2. Django (3.2, 4.0, 4.1)
9393
3. Django REST framework (3.13, 3.14)
9494

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ like the following:
5151

5252
## Requirements
5353

54-
1. Python (3.7, 3.8, 3.9, 3.10)
54+
1. Python (3.7, 3.8, 3.9, 3.10, 3.11)
5555
2. Django (3.2, 4.0, 4.1)
5656
3. Django REST framework (3.13, 3.14)
5757

example/tests/test_model_viewsets.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,14 @@ def test_key_in_post(self):
208208
def test_404_error_pointer(self):
209209
self.client.login(username="miles", password="pw")
210210
not_found_url = reverse("user-detail", kwargs={"pk": 12345})
211-
errors = {
212-
"errors": [{"detail": "Not found.", "status": "404", "code": "not_found"}]
213-
}
214211

215212
response = self.client.get(not_found_url)
216213
assert 404 == response.status_code
214+
result = response.json()
215+
216+
# exact detail message differs between Python versions
217+
# but only relevant is that there is a message
218+
assert result["errors"][0].pop("detail") is not None
219+
220+
errors = {"errors": [{"status": "404", "code": "not_found"}]}
217221
assert errors == response.json()

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def get_package_data(package):
9090
"Programming Language :: Python :: 3.8",
9191
"Programming Language :: Python :: 3.9",
9292
"Programming Language :: Python :: 3.10",
93+
"Programming Language :: Python :: 3.11",
9394
"Topic :: Internet :: WWW/HTTP",
9495
"Topic :: Software Development :: Libraries :: Application Frameworks",
9596
"Topic :: Software Development :: Libraries :: Python Modules",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
envlist =
33
py{37,38,39,310}-django32-drf{313,314,master},
44
py{38,39,310}-django40-drf{313,314,master},
5-
py{38,39,310}-django41-drf{314,master},
5+
py{38,39,310,311}-django41-drf{314,master},
66
lint,docs
77

88
[testenv]

0 commit comments

Comments
 (0)