8000 Support Django 4.0 · graphql-python/graphene-django@82b2d06 · GitHub
[go: up one dir, main page]

Skip to content

Commit 82b2d06

Browse files
MisterGlasstim-schilling
authored andcommitted
Support Django 4.0
Replace calls to deprecated methods Fix test config & Replace additional methods removed in django 4.0 Update tox for official Django 4 release
1 parent e7f7d8d commit 82b2d06

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ jobs:
1010
matrix:
1111
django: ["2.2", "3.0", "3.1", "3.2"]
1212
python-version: ["3.6", "3.7", "3.8", "3.9"]
13-
13+
include:
14+
- django: "3.2"
15+
python-version: "3.10"
16+
- django: "4.0"
17+
python-version: "3.10"
18+
- django: "main"
19+
python-version: "3.10"
1420
steps:
1521
- uses: actions/checkout@v2
1622
- name: Set up Python ${{ matrix.python-version }}

graphene_django/tests/urls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22

33
from ..views import GraphQLView
44

55
urlpatterns = [
6-
url(r"^graphql/batch", GraphQLView.as_view(batch=True)),
7-
url(r"^graphql", GraphQLView.as_view(graphiql=True)),
6+
re_path(r"^graphql/batch", GraphQLView.as_view(batch=True)),
7+
re_path(r"^graphql", GraphQLView.as_view(graphiql=True)),
88
]

graphene_django/tests/urls_inherited.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22

33
from ..views import GraphQLView
44
from .schema_view import schema
@@ -10,4 +10,4 @@ class CustomGraphQLView(GraphQLView):
1010
pretty = True
1111

1212

13-
urlpatterns = [url(r"^graphql/inherited/$", CustomGraphQLView.as_view())]
13+
urlpatterns = [re_path(r"^graphql/inherited/$", CustomGraphQLView.as_view())]

graphene_django/tests/urls_pretty.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22

33
from ..views import GraphQLView
44
from .schema_view import schema
55

6-
urlpatterns = [url(r"^graphql", GraphQLView.as_view(schema=schema, pretty=True))]
6+
urlpatterns = [re_path(r"^graphql", GraphQLView.as_view(schema=schema, pretty=True))]

tox.ini

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[tox]
22
envlist =
3-
py{36,37,38,39}-django{22,30,31,32,main},
3+
py{36,37,38,39}-django{22,30,31},
4+
py{36,37,38,39,310}-django32,
5+
py{38,39,310}-django{40,main},
46
black,flake8
57

68
[gh-actions]
@@ -9,13 +11,15 @@ python =
911
3.7: py37
1012
3.8: py38
1113
3.9: py39
14+
3.10: py310
1215

1316
[gh-actions:env]
1417
DJANGO =
1518
2.2: django22
1619
3.0: django30
1720
3.1: django31
1821
3.2: django32
22+
4.0: django40
1923
main: djangomain
2024

2125
[testenv]
@@ -26,13 +30,13 @@ setenv =
2630
deps =
2731
-e.[test]
2832
psycopg2-binary
29-
django20: Django>=2.0,<2.1
30-
django21: Django>=2.1,<2.2
3133
django22: Django>=2.2,<3.0
32-
django30: Django>=3.0a1,<3.1
34+
django30: Django>=3.0,<3.1
3335
django31: Django>=3.1,<3.2
3436
django32: Django>=3.2a1,<3.3
3537
djangomain: https://github.com/django/django/archive/main.zip
38+
django32: Django>=3.2,<4.0
39+
django40: Django>=4.0,<4.1
3640
commands = {posargs:py.test --cov=graphene_django graphene_django examples}
3741

3842
[testenv:black]

0 commit comments

Comments
 (0)
0