diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1cd101184..07c0766f8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,11 +10,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Build wheel and source tarball run: | pip install wheel diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 20cf7fb33..559326c41 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,11 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 90085c8ec..2dbf8229f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,13 +8,13 @@ jobs: strategy: max-parallel: 4 matrix: - django: ["2.2", "3.0", "3.1"] - python-version: ["3.6", "3.7", "3.8"] + django: ["2.2", "3.0", "3.1", "3.2"] + python-version: ["3.6", "3.7", "3.8", "3.9"] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/docs/tutorial-relay.rst b/docs/tutorial-relay.rst index 8494da191..acc4b0d33 100644 --- a/docs/tutorial-relay.rst +++ b/docs/tutorial-relay.rst @@ -281,7 +281,7 @@ from the command line. $ python ./manage.py runserver Performing system checks... - Django version 1.11, using settings 'cookbook.settings' + Django version 3.1.7, using settings 'cookbook.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. diff --git a/graphene_django/converter.py b/graphene_django/converter.py index 6bbf53452..da9616135 100644 --- a/graphene_django/converter.py +++ b/graphene_django/converter.py @@ -238,10 +238,7 @@ def dynamic_type(): if not _type: return - # We do this for a bug in Django 1.8, where null attr - # is not available in the OneToOneRel instance - null = getattr(field, "null", True) - return Field(_type, required=not null) + return Field(_type, required=not field.null) return Dynamic(dynamic_type) diff --git a/graphene_django/settings.py b/graphene_django/settings.py index c48712362..467c6a320 100644 --- a/graphene_django/settings.py +++ b/graphene_django/settings.py @@ -16,10 +16,7 @@ from django.conf import settings from django.test.signals import setting_changed -try: - import importlib # Available in Python 3.1+ -except ImportError: - from django.utils import importlib # Will be removed in Django 1.9 +import importlib # Available in Python 3.1+ # Copied shamelessly from Django REST Framework diff --git a/setup.py b/setup.py index 4750671cb..fd403c0df 100644 --- a/setup.py +++ b/setup.py @@ -49,11 +49,13 @@ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: Django", - "Framework :: Django :: 1.11", "Framework :: Django :: 2.2", "Framework :: Django :: 3.0", + "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", ], keywords="api graphql protocol rest relay graphene", packages=find_packages(exclude=["tests", "examples", "examples.*"]), diff --git a/tox.ini b/tox.ini index 4fd5a1bb3..7128afe09 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{36,37,38}-django{22,30,31,master}, + py{36,37,38,39}-django{22,30,31,32,main}, black,flake8 [gh-actions] @@ -8,13 +8,15 @@ python = 3.6: py36 3.7: py37 3.8: py38 + 3.9: py39 [gh-actions:env] DJANGO = 2.2: django22 3.0: django30 3.1: django31 - master: djangomaster + 3.2: django32 + main: djangomain [testenv] passenv = * @@ -24,24 +26,23 @@ setenv = deps = -e.[test] psycopg2-binary - django111: Django>=1.11,<2.0 - django111: djangorestframework<3.12 django20: Django>=2.0,<2.1 django21: Django>=2.1,<2.2 django22: Django>=2.2,<3.0 django30: Django>=3.0a1,<3.1 django31: Django>=3.1,<3.2 - djangomaster: https://github.com/django/django/archive/master.zip + django32: Django>=3.2a1,<3.3 + djangomain: https://github.com/django/django/archive/main.zip commands = {posargs:py.test --cov=graphene_django graphene_django examples} [testenv:black] -basepython = python3.8 +basepython = python3.9 deps = -e.[dev] commands = black --exclude "/migrations/" graphene_django examples setup.py --check [testenv:flake8] -basepython = python3.8 +basepython = python3.9 deps = -e.[dev] commands = flake8 graphene_django examples setup.py