Skip to content

Commit 3058118

Browse files
authored
Tox & actions updates (#1143)
* Update Django's main branch name * Add Python 3.9 to tox * Update base gh action versions * Add Django 3.2 to tests * Remove redundant Django 1.11 references * Update setup.py for new Django and Python versions
1 parent 594ca6e commit 3058118

File tree

8 files changed

+26
-29
lines changed

8 files changed

+26
-29
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v1
14-
- name: Set up Python 3.8
15-
uses: actions/setup-python@v1
13+
- uses: actions/checkout@v2
14+
- name: Set up Python 3.9
15+
uses: actions/setup-python@v2
1616
with:
17-
python-version: 3.8
17+
python-version: 3.9
1818
- name: Build wheel and source tarball
1919
run: |
2020
pip install wheel

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v1
11-
- name: Set up Python 3.8
12-
uses: actions/setup-python@v1
10+
- uses: actions/checkout@v2
11+
- name: Set up Python 3.9
12+
uses: actions/setup-python@v2
1313
with:
14-
python-version: 3.8
14+
python-version: 3.9
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
django: ["2.2", "3.0", "3.1"]
12-
python-version: ["3.6", "3.7", "3.8"]
11+
django: ["2.2", "3.0", "3.1", "3.2"]
12+
python-version: ["3.6", "3.7", "3.8", "3.9"]
1313

1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v2
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v2
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020
- name: Install dependencies

docs/tutorial-relay.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ from the command line.
281281
$ python ./manage.py runserver
282282
283283
Performing system checks...
284-
Django version 1.11, using settings 'cookbook.settings'
284+
Django version 3.1.7, using settings 'cookbook.settings'
285285
Starting development server at http://127.0.0.1:8000/
286286
Quit the server with CONTROL-C.
287287

graphene_django/converter.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,7 @@ def dynamic_type():
238238
if not _type:
239239
return
240240

241-
# We do this for a bug in Django 1.8, where null attr
242-
# is not available in the OneToOneRel instance
243-
null = getattr(field, "null", True)
244-
return Field(_type, required=not null)
241+
return Field(_type, required=not field.null)
245242

246243
return Dynamic(dynamic_type)
247244

graphene_django/settings.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
from django.conf import settings
1717
from django.test.signals import setting_changed
1818

19-
try:
20-
import importlib # Available in Python 3.1+
21-
except ImportError:
22-
from django.utils import importlib # Will be removed in Django 1.9
19+
import importlib # Available in Python 3.1+
2320

2421

2522
# Copied shamelessly from Django REST Framework

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@
4949
"Programming Language :: Python :: 3.6",
5050
"Programming Language :: Python :: 3.7",
5151
"Programming Language :: Python :: 3.8",
52+
"Programming Language :: Python :: 3.9",
5253
"Programming Language :: Python :: Implementation :: PyPy",
5354
"Framework :: Django",
54-
"Framework :: Django :: 1.11",
5555
"Framework :: Django :: 2.2",
5656
"Framework :: Django :: 3.0",
57+
"Framework :: Django :: 3.1",
58+
"Framework :: Django :: 3.2",
5759
],
5860
keywords="api graphql protocol rest relay graphene",
5961
packages=find_packages(exclude=["tests", "examples", "examples.*"]),

tox.ini

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
[tox]
22
envlist =
3-
py{36,37,38}-django{22,30,31,master},
3+
py{36,37,38,39}-django{22,30,31,32,main},
44
black,flake8
55

66
[gh-actions]
77
python =
88
3.6: py36
99
3.7: py37
1010
3.8: py38
11+
3.9: py39
1112

1213
[gh-actions:env]
1314
DJANGO =
1415
2.2: django22
1516
3.0: django30
1617
3.1: django31
17-
master: djangomaster
18+
3.2: django32
19+
main: djangomain
1820

1921
[testenv]
2022
passenv = *
@@ -24,24 +26,23 @@ setenv =
2426
deps =
2527
-e.[test]
2628
psycopg2-binary
27-
django111: Django>=1.11,<2.0
28-
django111: djangorestframework<3.12
2929
django20: Django>=2.0,<2.1
3030
django21: Django>=2.1,<2.2
3131
django22: Django>=2.2,<3.0
3232
django30: Django>=3.0a1,<3.1
3333
django31: Django>=3.1,<3.2
34-
djangomaster: https://github.com/django/django/archive/master.zip
34+
django32: Django>=3.2a1,<3.3
35+
djangomain: https://github.com/django/django/archive/main.zip
3536
commands = {posargs:py.test --cov=graphene_django graphene_django examples}
3637

3738
[testenv:black]
38-
basepython = python3.8
39+
basepython = python3.9
3940
deps = -e.[dev]
4041
commands =
4142
black --exclude "/migrations/" graphene_django examples setup.py --check
4243

4344
[testenv:flake8]
44-
basepython = python3.8
45+
basepython = python3.9
4546
deps = -e.[dev]
4647
commands =
4748
flake8 graphene_django examples setup.py

0 commit comments

Comments
 (0)