mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-25 11:03:58 +03:00
Python 3.10 compatibility (#1350)
Co-authored-by: Cyrille Pontvieux <cyrille@enialis.net>
This commit is contained in:
parent
aba771b2fc
commit
0845aa95e4
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9"]
|
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10-dev"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
import re
|
import re
|
||||||
from collections import Iterable, OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
try:
|
||||||
|
from collections.abc import Iterable
|
||||||
|
except ImportError:
|
||||||
|
from collections import Iterable
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from graphql_relay import connection_from_list
|
from graphql_relay import connection_from_list
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
import inspect
|
import inspect
|
||||||
from collections import Mapping, OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
try:
|
||||||
|
from collections.abc import Mapping
|
||||||
|
except ImportError:
|
||||||
|
from collections import Mapping
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from .argument import Argument, to_arguments
|
from .argument import Argument, to_arguments
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
import json
|
import json
|
||||||
from collections import Mapping
|
|
||||||
|
try:
|
||||||
|
from collections.abc import Mapping
|
||||||
|
except ImportError:
|
||||||
|
from collections import Mapping
|
||||||
|
|
||||||
|
|
||||||
def to_key(value):
|
def to_key(value):
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
from collections import Mapping, OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
try:
|
||||||
|
from collections.abc import Mapping
|
||||||
|
except ImportError:
|
||||||
|
from collections import Mapping
|
||||||
|
|
||||||
|
|
||||||
def deflate(node, index=None, path=None):
|
def deflate(node, index=None, path=None):
|
||||||
|
|
7
tox.ini
7
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py{27,36,37,38,39},flake8,pre-commit,mypy
|
envlist = py{27,36,37,38,39,310},flake8,pre-commit,mypy
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
python =
|
python =
|
||||||
|
@ -8,18 +8,19 @@ python =
|
||||||
3.7: py37
|
3.7: py37
|
||||||
3.8: py38
|
3.8: py38
|
||||||
3.9: py39
|
3.9: py39
|
||||||
|
3.10-dev: py310
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
passenv = *
|
passenv = *
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
deps =
|
deps =
|
||||||
-e.[test]
|
-e.[test]
|
||||||
py{36,37,38,39}: pytest-asyncio
|
py{36,37,38,39,310}: pytest-asyncio
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONPATH = .:{envdir}
|
PYTHONPATH = .:{envdir}
|
||||||
commands =
|
commands =
|
||||||
py{27}: py.test --cov=graphene graphene examples {posargs}
|
py{27}: py.test --cov=graphene graphene examples {posargs}
|
||||||
py{36,37,38,39}: py.test --cov=graphene graphene examples tests_asyncio tests_py36 {posargs}
|
py{36,37,38,39,310}: py.test --cov=graphene graphene examples tests_asyncio tests_py36 {posargs}
|
||||||
|
|
||||||
[testenv:pre-commit]
|
[testenv:pre-commit]
|
||||||
deps =
|
deps =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user