v3.0.0: Modernize for latest Starlette, drop EOL Pythons

- Bump version to 3.0.0
- Replace deprecated starlette.middleware.wsgi with a2wsgi
- Pin starlette[full]>=0.40, add a2wsgi dependency
- Bump minimum Python to 3.9, drop 3.7/3.8 support
- Remove whitenoise conditional (Python <3.8 no longer supported)
- Clean up CI matrix: drop old Python versions and OS exclusions
- Fix deprecated httpx TestClient usage in tests (data= -> content=, per-request cookies)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-22 05:23:18 -04:00
parent 944d47da45
commit e7776eb9e8
6 changed files with 15 additions and 55 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ def test_custom_encoding(api, session):
req.encoding = "ascii"
resp.text = await req.text
r = session.post(api.url_for(route), data=data)
r = session.post(api.url_for(route), content=data)
assert r.text == data
@@ -17,5 +17,5 @@ def test_bytes_encoding(api, session):
async def route(req, resp):
resp.text = (await req.content).decode("utf-8")
r = session.post(api.url_for(route), data=data)
r = session.post(api.url_for(route), content=data)
assert r.content == data
+4 -3
View File
@@ -277,7 +277,7 @@ def test_yaml_uploads(api):
dump = {"complicated": "times"}
r = api.requests.post(
api.url_for(route),
data=yaml.dump(dump),
content=yaml.dump(dump),
headers={"Content-Type": "application/x-yaml"},
)
assert r.json() == dump
@@ -512,7 +512,7 @@ def test_async_class_based_views(api):
resp.text = await req.text
data = "frame"
r = api.requests.post(api.url_for(Resource), data=data)
r = api.requests.post(api.url_for(Resource), content=data)
assert r.text == data
@@ -531,7 +531,8 @@ def test_cookies(api):
httponly=True,
)
r = api.requests.get(api.url_for(cookies), cookies={"hello": "universe"})
api.requests.cookies.set("hello", "universe")
r = api.requests.get(api.url_for(cookies))
assert r.json() == {"cookies": {"hello": "universe"}}
assert "sent" in r.cookies
assert "hello" in r.cookies