From e4a5af171ca2b9aacd974d59491f4cd7bb6828a622915d6fafcd4edc47145724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Sep 2024 16:26:26 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-starlette revision 79b299683902f19dd7e4ea70d382a444 --- python-starlette.changes | 169 +++++++++++++++++++++++++++++++++++++-- python-starlette.spec | 24 +++--- starlette-0.26.1.tar.gz | 3 - starlette-0.38.5.tar.gz | 3 + 4 files changed, 177 insertions(+), 22 deletions(-) delete mode 100644 starlette-0.26.1.tar.gz create mode 100644 starlette-0.38.5.tar.gz diff --git a/python-starlette.changes b/python-starlette.changes index d1f0f17..380c439 100644 --- a/python-starlette.changes +++ b/python-starlette.changes @@ -1,3 +1,160 @@ +------------------------------------------------------------------- +Sun Sep 8 15:05:40 UTC 2024 - Dirk Müller + +- update to 0.38.5: + * Schedule `BackgroundTasks` from within `BaseHTTPMiddleware` + #2688. +- update to 0.38.4: + * Ensure accurate `root_path` removal in `get_route_path` + function #2600 +- update to 0.38.3: + * Support for Python 3.13 #2662. + * Don't poll for disconnects in `BaseHTTPMiddleware` via + `StreamingResponse` #2620. + +------------------------------------------------------------------- +Tue Aug 13 09:41:53 UTC 2024 - Daniel Garcia + +- Update to 0.38.2: + * Fix routing.get_name() not to assume all routines have __name__ #2648 +- 0.38.1: + * Revert "Add support for ASGI pathsend extension" #2649. +- 0.38.0: + * Allow use of memoryview in StreamingResponse and Response #2576 + and #2577. + * Send 404 instead of 500 when filename requested is too long on + StaticFiles #2583. + * Fail fast on invalid Jinja2Template instantiation parameters #2568. + * Check endpoint handler is async only once #2536. + * Add proper synchronization to WebSocketTestSession #2597. + +------------------------------------------------------------------- +Sat Apr 20 08:10:00 UTC 2024 - Dirk Müller + +- update to 0.37.2: + * Add `bytes` to `_RequestData` type #2510. + * Revert "Turn `scope["client"]` to `None` on `TestClient` + * Remove deprecated `app` argument passed to `httpx.Client` on + the `TestClient` #2526. +- update to 0.37.1: + * Warn instead of raise for missing env file on `Config` #2485. +- update to 0.37.0: + * Support the WebSocket Denial Response ASGI extension #2041. +- update to 0.36.3: + * Create `anyio.Event` on async context #2459. +- update to 0.36.2: + * Upgrade `python-multipart` to `0.0.7` 13e5c26. + * Avoid duplicate charset on `Content-Type` #2443. +- update to 0.36.1: + * Check if "extensions" in scope before checking the extension +- update to 0.36.0: + * Add support for ASGI `pathsend` extension #2435. + * Cancel `WebSocketTestSession` on close #2427. + * Raise `WebSocketDisconnect` when `WebSocket.send()` excepts + `IOError` #2425. + * Raise `FileNotFoundError` when the `env_file` parameter on + `Config` is not valid #2422. + +------------------------------------------------------------------- +Sat Jan 13 20:43:25 UTC 2024 - Ben Greiner + +- Update to 0.35.1 + * Stop using the deprecated "method" parameter in FileResponse + inside of StaticFiles #2406. + * Make typing-extensions optional again #2409. +- Update to 0.35.0 + * Add *args to Middleware and improve its type hints #2381. + * Use Iterable instead Iterator on iterate_in_threadpool #2362. + * Handle root_path to keep compatibility with mounted ASGI + applications and WSGI #2400. + * Turn scope["client"] to None on TestClient #2377. + +------------------------------------------------------------------- +Fri Dec 29 10:02:33 UTC 2023 - Dirk Müller + +- update to 0.34.0: + * Use `ParamSpec` for `run_in_threadpool` #2375. + * Add `UploadFile.__repr__` #2360. + * Merge URLs properly on `TestClient` #2376. + * Take weak ETags in consideration on `StaticFiles` #2334. + * Deprecate `FileResponse(method=...)` parameter #2366. + * Add `middleware` per `Route`/`WebSocketRoute` #2349. + * Add `middleware` per `Router` #2351. + * Do not overwrite `"path"` and `"root_path"` scope keys #2352. + * Set `ensure_ascii=False` on `json.dumps()` for + `WebSocket.send_json()` #2341. +- update to 0.32.0.post1: + * Revert mkdocs-material from 9.1.17 to 9.4.7 #2326. +- update to 0.32.0: + * Send `reason` on `WebSocketDisconnect` #2309. + * Add `domain` parameter to `SessionMiddleware` #2280. + * Inherit from `HTMLResponse` instead of `Response` on + `_TemplateResponse` #2274. + * Restore the `Response.render` type annotation to its + pre-0.31.0 state #2264. + +------------------------------------------------------------------- +Wed Nov 22 17:27:05 UTC 2023 - Daniel Garcia + +- Override pytest configuration to do not handle warnings as errors. + +------------------------------------------------------------------- +Wed Oct 18 07:31:47 UTC 2023 - David Anes + +- Update to 0.31.1: + * Fixes: + - Fix import error when exceptiongroup isn't available #2231. + - Set url_for global for custom Jinja environments #2230. + +- Update to 0.31.0: + * Added + - Officially support Python 3.12 #2214. + - Support AnyIO 4.0 #2211. + - Strictly type annotate Starlette (strict mode on mypy) #2180. + * Fixed + - Don't group duplicated headers on a single string when using the TestClient #2219. + +- Update to 0.30.0 + * Removed + - Drop Python 3.7 support #2178. + +- Update to 0.29.0: + * Added + - Add follow_redirects parameter to TestClient #2207. + - Add __str__ to HTTPException and WebSocketException #2181. + - Warn users when using lifespan together with on_startup/on_shutdown #2193. + - Collect routes from Host to generate the OpenAPI schema #2183. + - Add request argument to TemplateResponse #2191. + * Fixed + - Stop body_stream in case more_body=False on BaseHTTPMiddleware #2194. + +- Update to 0.28.0: + * Changed + - Reuse Request's body buffer for call_next in BaseHTTPMiddleware #1692. + - Move exception handling logic to Route #2026. + * Added + . Add env parameter to Jinja2Templates, and deprecate **env_options #2159. + . Add clear error message when httpx is not installed #2177. + * Fixed + - Allow "name" argument on templates url_for() #2127. + +------------------------------------------------------------------- +Sun Jun 11 13:34:22 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Wed May 17 07:42:13 UTC 2023 - David Anes + +- Update to 0.27.0: + * Added + - Minify JSON websocket data via send_json #2128 + + * Fixed + - Replace commonprefix by commonpath on StaticFiles 1797de4. + - Convert ImportErrors into ModuleNotFoundError #2135. + - Correct the RuntimeError message content in websockets #2141. + ------------------------------------------------------------------- Tue Mar 14 09:11:16 UTC 2023 - David Anes @@ -20,14 +177,14 @@ Fri Mar 10 11:36:42 UTC 2023 - David Anes * Fixed - Allow "name" argument on url_for() and url_path_for() #2050. * Deprecated - - Deprecate on_startup and on_shutdown events #2070. + - Deprecate on_startup and on_shutdown events #2070. ------------------------------------------------------------------- Thu Feb 16 16:22:35 UTC 2023 - David Anes - Update to 0.25.0: * Fixed - - Limit the number of fields and files when parsing + - Limit the number of fields and files when parsing multipart/form-data on the MultipartParser. - Fixed upstream: reenable tests for tests for i586 and armv7l. @@ -74,7 +231,7 @@ Tue Dec 13 08:27:49 UTC 2022 - David Anes * Fixed - Fix bug on FloatConvertor regex. -- Fix test package by adding 'exceptiongroup' python module as a +- Fix test package by adding 'exceptiongroup' python module as a build dependency. ------------------------------------------------------------------- @@ -110,7 +267,7 @@ Thu Sep 29 08:19:37 UTC 2022 - Michael Ströder ------------------------------------------------------------------- Thu Aug 11 05:22:41 UTC 2022 - Steve Kowalik -- Remove unneeded BuildRequires on contextlib2. +- Remove unneeded BuildRequires on contextlib2. ------------------------------------------------------------------- Fri Aug 5 11:37:43 UTC 2022 - John Vandenberg @@ -205,7 +362,7 @@ Wed Feb 23 01:08:10 UTC 2022 - Steve Kowalik on the system. This fixes an error raised on systems with FIPS enabled #1366 and #1410. * Fix path_params type on url_path_for() method i.e. turn str into Any #1341. - * Host now ignores port on routing #1322. + * Host now ignores port on routing #1322. - Set asyncio_mode when running pytest, and stop turning warnings into errors. @@ -308,4 +465,4 @@ Wed Dec 2 14:49:51 UTC 2020 - Michael Ströder Sat Sep 5 11:33:42 UTC 2020 - Michael Ströder - initial packaging of 0.13.8 - + diff --git a/python-starlette.spec b/python-starlette.spec index 2a9eece..53bef6d 100644 --- a/python-starlette.spec +++ b/python-starlette.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package python-starlette # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,15 +25,15 @@ %bcond_with test %endif -%define skip_python2 1 +%{?sle15_python_module_pythons} Name: python-starlette%{psuffix} -Version: 0.26.1 +Version: 0.38.5 Release: 0 Summary: Lightweight ASGI framework/toolkit License: BSD-3-Clause URL: https://github.com/encode/starlette Source: https://github.com/encode/starlette/archive/refs/tags/%{version}.tar.gz#/starlette-%{version}.tar.gz -BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} BuildRequires: fdupes @@ -49,16 +49,17 @@ BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module Jinja2} BuildRequires: %{python_module httpx >= 0.22} BuildRequires: %{python_module itsdangerous} -BuildRequires: %{python_module python-multipart} +BuildRequires: %{python_module python-multipart >= 0.0.7} # /SECTION # SECTION test BuildRequires: %{python_module exceptiongroup} +BuildRequires: %{python_module asyncio} BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest} BuildRequires: %{python_module trio} # testing requires it for all flavors -BuildRequires: %{python_module typing_extensions} -BuildRequires: %{python_module importlib-metadata} +BuildRequires: %{python_module typing_extensions >= 4.10.0} +BuildRequires: %{python_module importlib-metadata >= 7.0.1} # /SECITON %endif %python_subpackages @@ -81,17 +82,14 @@ building high performance asyncio services. %check %if %{with test} -# Remove unrecognized arguments: --strict-config --strict-markers -sed -i "s|--strict-config||" setup.cfg -sed -i "s|--strict-markers||" setup.cfg -sed -i "s| error$||" setup.cfg - # The following tests don't work in some archs because time_t cannot # hold the values the test expect, as they go beyond the maximum # value in i586 and armv7l. As we are using Buildarch: noarch, we # cannot just use ifarch conditionals here... ignored_tests="test_set_cookie" ignored_tests="$ignored_tests or test_expires_on_set_cookie" +# fails to raise a deprecation warning as of 2024/04/25 +ignored_tests="$ignored_tests or test_lifespan_with_on_events" %pytest --asyncio-mode=strict -k "not ($ignored_tests)" %endif diff --git a/starlette-0.26.1.tar.gz b/starlette-0.26.1.tar.gz deleted file mode 100644 index dd59d57..0000000 --- a/starlette-0.26.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e876e96551cacc546031fb28b9d51ba5c1e723bf74345f072307362dbe808842 -size 2837634 diff --git a/starlette-0.38.5.tar.gz b/starlette-0.38.5.tar.gz new file mode 100644 index 0000000..481c335 --- /dev/null +++ b/starlette-0.38.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ff52aa20a63821de16dd72f698df8b106789e427ceece9b526204fcfc9b6fe5 +size 2569392