Skip to content

Commit ab0fff9

Browse files
authored
Test on Python 3.10 (#1201)
1 parent a839d92 commit ab0fff9

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

.github/workflows/test-suite.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: ["3.6", "3.7", "3.8", "3.9"]
17+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10.0-beta.3"]
1818

1919
steps:
2020
- uses: "actions/checkout@v2"

docs/graphql.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
!!! Warning
33

44
GraphQL support in Starlette is **deprecated** as of version 0.15 and will
5-
be removed in a future release. Please consider using a third-party library
6-
to provide GraphQL support. This is usually done by mounting a GraphQL ASGI
7-
application. See [#619](https://github.com./encode/starlette/issues/619).
5+
be removed in a future release. It is also incompatible with Python 3.10+.
6+
Please consider using a third-party library to provide GraphQL support. This
7+
is usually done by mounting a GraphQL ASGI application.
8+
See [#619](https://github.com./encode/starlette/issues/619).
89
Some example libraries are:
910

1011
* [Ariadne](https://ariadnegraphql.org/docs/asgi)

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Optionals
2-
graphene
2+
graphene; python_version<'3.10'
33
itsdangerous
44
jinja2
55
python-multipart

setup.cfg

+5
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ filterwarnings=
3232

3333
[coverage:run]
3434
source_pkgs = starlette, tests
35+
# GraphQLApp incompatible with and untested on Python 3.10. It's deprecated, let's just ignore
36+
# coverage for it until it's gone.
37+
omit =
38+
starlette/graphql.py
39+
tests/test_graphql.py

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_long_description():
4040
install_requires=["anyio>=3.0.0,<4"],
4141
extras_require={
4242
"full": [
43-
"graphene",
43+
"graphene; python_version<'3.10'",
4444
"itsdangerous",
4545
"jinja2",
4646
"python-multipart",
@@ -60,6 +60,7 @@ def get_long_description():
6060
"Programming Language :: Python :: 3.7",
6161
"Programming Language :: Python :: 3.8",
6262
"Programming Language :: Python :: 3.9",
63+
"Programming Language :: Python :: 3.10",
6364
],
6465
zip_safe=False,
6566
)

tests/conftest.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
import sys
2+
13
import pytest
24

35
from starlette.testclient import TestClient
46

7+
collect_ignore = ["test_graphql.py"] if sys.version_info >= (3, 10) else []
8+
59

610
@pytest.fixture(
711
params=[

0 commit comments

Comments
 (0)