Sync from SUSE:SLFO:Main python-starlette revision 79b299683902f19dd7e4ea70d382a444

This commit is contained in:
Adrian Schröter 2024-09-13 16:26:26 +02:00
parent 2b09508872
commit e4a5af171c
4 changed files with 177 additions and 22 deletions

View File

@ -1,3 +1,160 @@
-------------------------------------------------------------------
Sun Sep 8 15:05:40 UTC 2024 - Dirk Müller <dmueller@suse.com>
- 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 <daniel.garcia@suse.com>
- 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 <dmueller@suse.com>
- 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 <code@bnavigator.de>
- 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 <dmueller@suse.com>
- 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 <daniel.garcia@suse.com>
- Override pytest configuration to do not handle warnings as errors.
-------------------------------------------------------------------
Wed Oct 18 07:31:47 UTC 2023 - David Anes <david.anes@suse.com>
- 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 <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Wed May 17 07:42:13 UTC 2023 - David Anes <david.anes@suse.com>
- 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 <david.anes@suse.com>

View File

@ -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

BIN
starlette-0.26.1.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
starlette-0.38.5.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.