]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Test on Python 3.10 (#1201)
authorJamie Hewland <jhewland@gmail.com>
Sat, 19 Jun 2021 17:02:53 +0000 (18:02 +0100)
committerGitHub <noreply@github.com>
Sat, 19 Jun 2021 17:02:53 +0000 (18:02 +0100)
.github/workflows/test-suite.yml
docs/graphql.md
requirements.txt
setup.cfg
setup.py
tests/conftest.py

index eed46850a95e5953702f66ffa79f55cd4b38fa53..751c5193bece7583579b3920a46b58c4cc7e6e36 100644 (file)
@@ -14,7 +14,7 @@ jobs:
 
     strategy:
       matrix:
-        python-version: ["3.6", "3.7", "3.8", "3.9"]
+        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10.0-beta.3"]
 
     steps:
       - uses: "actions/checkout@v2"
index 72b6478f816008ceba434cf2ce546311bb26058e..281bdea8508dbb60352ddd34ac9d29a82ac37ad4 100644 (file)
@@ -2,9 +2,10 @@
 !!! Warning
 
     GraphQL support in Starlette is **deprecated** as of version 0.15 and will
-    be removed in a future release. Please consider using a third-party library
-    to provide GraphQL support. This is usually done by mounting a GraphQL ASGI
-    application. See [#619](https://github.com/encode/starlette/issues/619).
+    be removed in a future release. It is also incompatible with Python 3.10+.
+    Please consider using a third-party library to provide GraphQL support. This
+    is usually done by mounting a GraphQL ASGI application.
+    See [#619](https://github.com/encode/starlette/issues/619).
     Some example libraries are:
 
     * [Ariadne](https://ariadnegraphql.org/docs/asgi)
index 5d0fd280d59c6e6065498f8edd9f8d304d82da83..abc7a3b0a540045e029a8689a8e50133ff4bb880 100644 (file)
@@ -1,5 +1,5 @@
 # Optionals
-graphene
+graphene; python_version<'3.10'
 itsdangerous
 jinja2
 python-multipart
index 1f2db52f0f9c204cbce6dc4368f20f70ecd8eb87..f59a72029250b10f8ff5f22a6bc5c6fcce888634 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -32,3 +32,8 @@ filterwarnings=
 
 [coverage:run]
 source_pkgs = starlette, tests
+# GraphQLApp incompatible with and untested on Python 3.10. It's deprecated, let's just ignore
+# coverage for it until it's gone.
+omit =
+  starlette/graphql.py
+  tests/test_graphql.py
index a687ad861d8fd255cee87f7512f24d9d6dae1e20..978a606c7640e349b3493735d036f8d88f99700d 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ setup(
     install_requires=["anyio>=3.0.0,<4"],
     extras_require={
         "full": [
-            "graphene",
+            "graphene; python_version<'3.10'",
             "itsdangerous",
             "jinja2",
             "python-multipart",
@@ -60,6 +60,7 @@ setup(
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
     ],
     zip_safe=False,
 )
index d1f3ba8e4837496cef71dbd121bb2bda62d66bd4..9ed420305da8695ceaaf5aa3973cd1ced34e7bf3 100644 (file)
@@ -1,7 +1,11 @@
+import sys
+
 import pytest
 
 from starlette.testclient import TestClient
 
+collect_ignore = ["test_graphql.py"] if sys.version_info >= (3, 10) else []
+
 
 @pytest.fixture(
     params=[