From e4a4b0e4fa03a57cc8677bd115e10f196df2cf57 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Wed, 10 Dec 2025 20:12:50 +0100 Subject: [PATCH] Remove code examples for Python 3.8 in `cors` --- docs/en/docs/tutorial/cors.md | 2 +- docs_src/cors/{tutorial001.py => tutorial001_py39.py} | 0 tests/test_tutorial/test_cors/test_tutorial001.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename docs_src/cors/{tutorial001.py => tutorial001_py39.py} (100%) diff --git a/docs/en/docs/tutorial/cors.md b/docs/en/docs/tutorial/cors.md index e3de37b43..8a3a8eb0a 100644 --- a/docs/en/docs/tutorial/cors.md +++ b/docs/en/docs/tutorial/cors.md @@ -46,7 +46,7 @@ You can also specify whether your backend allows: * Specific HTTP methods (`POST`, `PUT`) or all of them with the wildcard `"*"`. * Specific HTTP headers or all of them with the wildcard `"*"`. -{* ../../docs_src/cors/tutorial001.py hl[2,6:11,13:19] *} +{* ../../docs_src/cors/tutorial001_py39.py hl[2,6:11,13:19] *} The default parameters used by the `CORSMiddleware` implementation are restrictive by default, so you'll need to explicitly enable particular origins, methods, or headers, in order for browsers to be permitted to use them in a Cross-Domain context. diff --git a/docs_src/cors/tutorial001.py b/docs_src/cors/tutorial001_py39.py similarity index 100% rename from docs_src/cors/tutorial001.py rename to docs_src/cors/tutorial001_py39.py diff --git a/tests/test_tutorial/test_cors/test_tutorial001.py b/tests/test_tutorial/test_cors/test_tutorial001.py index f62c9df4f..6a733693a 100644 --- a/tests/test_tutorial/test_cors/test_tutorial001.py +++ b/tests/test_tutorial/test_cors/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from docs_src.cors.tutorial001 import app +from docs_src.cors.tutorial001_py39 import app def test_cors():