diff --git a/0001-Fix-test-error-for-pkg-upgrade.patch b/0001-Fix-test-error-for-pkg-upgrade.patch new file mode 100644 index 0000000000000000000000000000000000000000..ef8bf250506ff204333b82755ac5a58edd8ba615 --- /dev/null +++ b/0001-Fix-test-error-for-pkg-upgrade.patch @@ -0,0 +1,48 @@ +From 4ee5ab94366852555b5e88c84ae721719f95f585 Mon Sep 17 00:00:00 2001 +From: desert-sailor +Date: Mon, 10 Mar 2025 15:00:49 +0800 +Subject: [PATCH] Fix test error for pkg upgrade + +--- + tests/middleware/test_wsgi.py | 2 +- + tests/test_requests.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/middleware/test_wsgi.py b/tests/middleware/test_wsgi.py +index 3511c89..96fe4b9 100644 +--- a/tests/middleware/test_wsgi.py ++++ b/tests/middleware/test_wsgi.py +@@ -78,7 +78,7 @@ def test_wsgi_post(test_client_factory: TestClientFactory) -> None: + client = test_client_factory(app) + response = client.post("/", json={"example": 123}) + assert response.status_code == 200 +- assert response.text == '{"example":123}' ++ assert response.text == '{"example": 123}' + + + def test_wsgi_exception(test_client_factory: TestClientFactory) -> None: +diff --git a/tests/test_requests.py b/tests/test_requests.py +index 7e2c608..b856473 100644 +--- a/tests/test_requests.py ++++ b/tests/test_requests.py +@@ -92,7 +92,7 @@ def test_request_body(test_client_factory: TestClientFactory) -> None: + assert response.json() == {"body": ""} + + response = client.post("/", json={"a": "123"}) +- assert response.json() == {"body": '{"a":"123"}'} ++ assert response.json() == {"body": '{"a": "123"}'} + + response = client.post("/", data="abc") # type: ignore + assert response.json() == {"body": "abc"} +@@ -113,7 +113,7 @@ def test_request_stream(test_client_factory: TestClientFactory) -> None: + assert response.json() == {"body": ""} + + response = client.post("/", json={"a": "123"}) +- assert response.json() == {"body": '{"a":"123"}'} ++ assert response.json() == {"body": '{"a": "123"}'} + + response = client.post("/", data="abc") # type: ignore + assert response.json() == {"body": "abc"} +-- +2.43.0 + diff --git a/python-starlette.spec b/python-starlette.spec index b578ecc40d0cc1c08fb7e7bb0a43bfdd171a9675..95e3bd94694b4d2dd4c7c78babf14071af44ccc3 100644 --- a/python-starlette.spec +++ b/python-starlette.spec @@ -1,11 +1,12 @@ Name: python-starlette -Version: 0.41.3 +Version: 0.46.1 Release: 1 Summary: The little ASGI library that shines License: BSD-3-Clause URL: https://www.starlette.io/ Source: https://github.com/encode/starlette/archive/%{version}/starlette-%{version}.tar.gz +Patch1: 0001-Fix-test-error-for-pkg-upgrade.patch BuildArch: noarch @@ -95,5 +96,21 @@ k="${k-}${k+ and }not test_lifespan_with_on_events" %changelog +* Mon Mar 10 2025 Dongxing Wang - 0.46.1-1 +- Update package with version 0.46.1 + Fix: Allow relative directory path when follow_symlinks=True + Add: GZipMiddleware: Make sure Vary header is always added if a response can be compressed + Fix: Raise exception from background task on BaseHTTPMiddleware + Fix: GZipMiddleware: Don't compress on server sent events + Mod: MultiPartParser: Rename max_file_size to spool_max_size + Drop Python 3.8 support + Remove ExceptionMiddleware import proxy from starlette.exceptions module + Remove deprecated WS_1004_NO_STATUS_RCVD and WS_1005_ABNORMAL_CLOSURE + Add client parameter to TestClient + Add max_part_size parameter to Request.form() + Remove deprecated allow_redirects argument from TestClient + Make UUID path parameter conversion more flexible + Raise ClientDisconnect on StreamingResponse + * Wed Dec 04 2024 Dongxing Wang - 0.41.3-1 - Package init diff --git a/starlette-0.41.3.tar.gz b/starlette-0.41.3.tar.gz deleted file mode 100644 index 6e208b118cdbca336199df2011dad67ee94682c6..0000000000000000000000000000000000000000 Binary files a/starlette-0.41.3.tar.gz and /dev/null differ diff --git a/starlette-0.46.1.tar.gz b/starlette-0.46.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7a055705864d2db79dbd782216969ec507eaf3e2 Binary files /dev/null and b/starlette-0.46.1.tar.gz differ