diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 85060a19d9..3d2724819c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,7 @@ jobs: - uses: actions/checkout@v3 - uses: wntrblm/nox@main with: - python-versions: "3.8, 3.9, 3.10, 3.11" + python-versions: "3.8, 3.9, 3.10, 3.11, 3.12" - name: Pip and nox cache id: cache @@ -121,7 +121,7 @@ jobs: - uses: actions/checkout@v3 - uses: wntrblm/nox@main with: - python-versions: "3.7, 3.8, 3.9, 3.10, 3.11" + python-versions: "3.8, 3.9, 3.10, 3.11, 3.12" - name: Pip and nox cache id: cache diff --git a/noxfile.py b/noxfile.py index 8d98711991..bd37494d4a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,7 +4,7 @@ nox.options.reuse_existing_virtualenvs = True nox.options.error_on_external_run = True -PYTHON_VERSIONS = ["3.11", "3.10", "3.9", "3.8"] +PYTHON_VERSIONS = ["3.12", "3.11", "3.10", "3.9", "3.8"] COMMON_PYTEST_OPTIONS = [ diff --git a/tests/federation/test_schema.py b/tests/federation/test_schema.py index ea801a44ac..2b96a27f60 100644 --- a/tests/federation/test_schema.py +++ b/tests/federation/test_schema.py @@ -303,9 +303,15 @@ def top_products(self, first: int) -> List[ProductFed]: return [] with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message=r"'.*' is deprecated and slated for removal in Python 3\.\d+", + ) + strawberry.federation.Schema( query=Query, enable_federation_2=True, ) - assert not w + assert len(w) == 0 diff --git a/tests/schema/extensions/test_extensions.py b/tests/schema/extensions/test_extensions.py index 23619d708c..3deb9be140 100644 --- a/tests/schema/extensions/test_extensions.py +++ b/tests/schema/extensions/test_extensions.py @@ -473,6 +473,11 @@ def on_executing_start(self): async def test_legacy_extension_supported(): with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message=r"'.*' is deprecated and slated for removal in Python 3\.\d+", + ) class CompatExtension(ExampleExtension): async def on_request_start(self): @@ -521,6 +526,11 @@ def person(self) -> Person: async def test_legacy_only_start(): with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message=r"'.*' is deprecated and slated for removal in Python 3\.\d+", + ) class CompatExtension(ExampleExtension): expected = {1, 2, 3, 4} @@ -559,6 +569,11 @@ def person(self) -> Person: async def test_legacy_only_end(): with warnings.catch_warnings(record=True) as w: + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message=r"'.*' is deprecated and slated for removal in Python 3\.\d+", + ) class CompatExtension(ExampleExtension): async def on_request_end(self):