Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-uvicorn for openSUSE:Factory checked in at 2022-08-08 08:45:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-uvicorn (Old) and /work/SRC/openSUSE:Factory/.python-uvicorn.new.1521 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-uvicorn" Mon Aug 8 08:45:05 2022 rev:7 rq:993302 version:0.18.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-uvicorn/python-uvicorn.changes 2022-02-03 23:16:43.736513466 +0100 +++ /work/SRC/openSUSE:Factory/.python-uvicorn.new.1521/python-uvicorn.changes 2022-08-08 08:45:17.886470992 +0200 @@ -1,0 +2,59 @@ +Fri Aug 5 09:51:32 UTC 2022 - Dominique Leuenberger <dims...@opensuse.org> + +- Fix URL to 1537.patch: add ".patch" to the gh Pr to reference the + raw patch, not the gh webui. + +------------------------------------------------------------------- +Tue Jul 19 20:59:25 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Disable testing with watchfiles + * We don't want it in Ring1-MinimalX + +------------------------------------------------------------------- +Mon Jul 18 20:17:15 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Update to version 0.18.2 + * Add default `log_config` on `uvicorn.run()` (#1541) + * Revert `logging` file name modification (#1543) +- Release 0.18.1 + * Use `DEFAULT_MAX_INCOMPLETE_EVENT_SIZE` as default to + `h11_max_incomplete_event_size` on the CLI (#1534) +- Release 0.18.0 + * The `reload` flag prioritizes `watchfiles` instead of the + deprecated `watchgod` (#1437) + * Annotate `uvicorn.run()` function (#1423) + * Allow configuring `max_incomplete_event_size` for `h11` + implementation (#1514) + * Remove `asgiref` dependency (#1532) + * Turn `raw_path` into bytes on both websockets implementations + (#1487) + * Revert log exception traceback in case of invalid HTTP request + (#1518) + * Set `asyncio.WindowsSelectorEventLoopPolicy()` when using + multiple workers to avoid "WinError 87" (#1454) +- Release 0.17.5 + * Fix case where url is fragmented in httptools protocol (#1263) + 2/16/22 + * Fix WSGI middleware not to explode quadratically in the case of + a larger body (#1329) + * Send HTTP 400 response for invalid request (#1352) +- Release 0.17.4 + * Replace `create_server` by `create_unix_server` (#1362) +- Release 0.17.3 + * Drop wsproto version checking. (#1359) +- Release 0.17.2 + * Revert #1332. While trying to solve the memory leak, it + introduced an issue (#1345) when the server receives big chunks + of data using the `httptools` implementation. (#1354) + * Revert stream interface changes. This was introduced on 0.14.0, + and caused an issue (#1226), which caused a memory leak when + sending TCP pings. (#1355) + * Fix wsproto version check expression (#1342) +- Release 0.17.1 + * Move all data handling logic to protocol and ensure connection + is closed. (#1332) + * Change `spec_version` field from "2.1" to "2.3", as Uvicorn is + compliant with that version of the ASGI specifications. (#1337) +- Add uvicorn-pr1537-no-watchgod-tests.patch gh#encode/uvicorn#1537 + +------------------------------------------------------------------- Old: ---- uvicorn-0.17.0.tar.gz New: ---- uvicorn-0.18.2.tar.gz uvicorn-pr1537-no-watchgod-tests.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-uvicorn.spec ++++++ --- /var/tmp/diff_new_pack.Adkigo/_old 2022-08-08 08:45:18.578473028 +0200 +++ /var/tmp/diff_new_pack.Adkigo/_new 2022-08-08 08:45:18.578473028 +0200 @@ -16,27 +16,29 @@ # -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 Name: python-uvicorn -Version: 0.17.0 +Version: 0.18.2 Release: 0 Summary: An Asynchronous Server Gateway Interface server License: BSD-3-Clause URL: https://github.com/encode/uvicorn Source: https://github.com/encode/uvicorn/archive/%{version}.tar.gz#/uvicorn-%{version}.tar.gz +# PATCH-FIX-UPSTREAM uvicorn-pr1537-no-watchgod-tests.patch gh#encode/uvicorn#1537 +Patch1: https://github.com/encode/uvicorn/pull/1537.patch#/uvicorn-pr1537-no-watchgod-tests.patch +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-asgiref >= 3.4 Requires: python-click >= 7.0 Requires: python-h11 >= 0.8.0 -Requires: python-httptools >= 0.1.0 +%if 0%{python_version_nodots} < 38 Requires: python-typing_extensions -Requires: python-websockets >= 8.0 +%endif Recommends: python-PyYAML >= 5.1 +Recommends: python-httptools >= 0.4.0 +Recommends: python-websockets >= 8.0 Suggests: python-uvloop >= 0.14.0 -Suggests: python-watchgod >= 0.6 +Suggests: python-watchfiles >= 0.13 Suggests: python-wsproto >= 0.15.0 Requires(post): update-alternatives Requires(postun):update-alternatives @@ -46,7 +48,7 @@ BuildRequires: %{python_module asgiref >= 3.4} BuildRequires: %{python_module click >= 7.0} BuildRequires: %{python_module h11 >= 0.8.0} -BuildRequires: %{python_module httptools >= 0.1.0} +BuildRequires: %{python_module httptools >= 0.4.0} BuildRequires: %{python_module httpx >= 0.18} BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest-mock} @@ -54,11 +56,12 @@ BuildRequires: %{python_module python-dotenv} BuildRequires: %{python_module requests} BuildRequires: %{python_module trustme} -BuildRequires: %{python_module typing_extensions} +BuildRequires: %{python_module typing_extensions if %python-base < 3.8} BuildRequires: %{python_module uvloop >= 0.14.0} -BuildRequires: %{python_module watchgod >= 0.6} BuildRequires: %{python_module websockets >= 8.0} BuildRequires: %{python_module wsproto >= 0.15.0} +# We don't want watchfiles in Ring1 +#BuildRequires: #{python_module watchfiles >= 0.13} # /SECTION %python_subpackages @@ -87,14 +90,13 @@ %check # Required for reporting bugs %python_exec -m uvicorn --version -# Three wsproto upgrade related tests -# https://github.com/encode/uvicorn/issues/868 -%pytest -rs -k 'not (test_supported_upgrade_request or test_invalid_upgrade)' +%pytest %files %{python_files} %doc README.md %license LICENSE.md %python_alternative %{_bindir}/uvicorn -%{python_sitelib}/* +%{python_sitelib}/uvicorn +%{python_sitelib}/uvicorn-%{version}*-info %changelog ++++++ uvicorn-0.17.0.tar.gz -> uvicorn-0.18.2.tar.gz ++++++ ++++ 6565 lines of diff (skipped) ++++++ uvicorn-pr1537-no-watchgod-tests.patch ++++++ >From 5bd9a221116458b0922baeadc0a51ff02ac0b56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org> Date: Fri, 24 Jun 2022 07:43:33 +0200 Subject: [PATCH] Handle missing watchfiles and watchgod gracefully in tests Skip the tests relying on watchfiles and watchgod reloaders when the required dependencies are not available rather than causing an ImportError. Since these packages are optional and watchfiles does not support all the platforms that uvicorn used to work on so far, it is useful to be able to run at least part of the test suite there. --- tests/supervisors/test_reload.py | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tests/supervisors/test_reload.py b/tests/supervisors/test_reload.py index 04bfb41cf..6010d703b 100644 --- a/tests/supervisors/test_reload.py +++ b/tests/supervisors/test_reload.py @@ -2,7 +2,7 @@ import signal from pathlib import Path from time import sleep -from typing import Type +from typing import Optional, Type import pytest @@ -10,8 +10,16 @@ from uvicorn.config import Config from uvicorn.supervisors.basereload import BaseReload, _display_path from uvicorn.supervisors.statreload import StatReload -from uvicorn.supervisors.watchfilesreload import WatchFilesReload -from uvicorn.supervisors.watchgodreload import WatchGodReload + +try: + from uvicorn.supervisors.watchfilesreload import WatchFilesReload +except ImportError: # pragma: no cover + WatchFilesReload = None + +try: + from uvicorn.supervisors.watchgodreload import WatchGodReload +except ImportError: # pragma: no cover + WatchGodReload = None def run(sockets): @@ -23,8 +31,10 @@ class TestBaseReload: def setup( self, reload_directory_structure: Path, - reloader_class: Type[BaseReload], + reloader_class: Optional[Type[BaseReload]], ): + if reloader_class is None: # pragma: no cover + pytest.skip("Needed dependency not installed") self.reload_path = reload_directory_structure self.reloader_class = reloader_class @@ -43,7 +53,7 @@ def _setup_reloader(self, config: Config) -> BaseReload: def _reload_tester(self, touch_soon, reloader: BaseReload, *files: Path) -> bool: reloader.restart() - if isinstance(reloader, WatchFilesReload): + if WatchFilesReload is not None and isinstance(reloader, WatchFilesReload): touch_soon(*files) else: assert not next(reloader) @@ -240,6 +250,7 @@ def test_override_defaults(self, touch_soon) -> None: reloader.shutdown() + @pytest.mark.skipif(WatchFilesReload is None, reason="watchfiles not available") @pytest.mark.parametrize("reloader_class", [WatchFilesReload]) def test_watchfiles_no_changes(self) -> None: sub_dir = self.reload_path / "app" / "sub" @@ -296,6 +307,7 @@ def test_should_detect_new_reload_dirs( reloader.shutdown() +@pytest.mark.skipif(WatchFilesReload is None, reason="watchfiles not available") def test_should_watch_one_dir_cwd(mocker, reload_directory_structure): mock_watch = mocker.patch("uvicorn.supervisors.watchfilesreload.watch") app_dir = reload_directory_structure / "app" @@ -312,6 +324,7 @@ def test_should_watch_one_dir_cwd(mocker, reload_directory_structure): assert mock_watch.call_args[0] == (Path.cwd(),) +@pytest.mark.skipif(WatchFilesReload is None, reason="watchfiles not available") def test_should_watch_separate_dirs_outside_cwd(mocker, reload_directory_structure): mock_watch = mocker.patch("uvicorn.supervisors.watchfilesreload.watch") app_dir = reload_directory_structure / "app"