14
0
Files
python-uvicorn/python-uvicorn.spec

103 lines
3.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-uvicorn
#
Accepting request 948359 from home:kwk:branches:devel:languages:python - Update to version 0.17.0: * Release 0.17.0 (#1322) * Fix reload process behavior when exception is raised (#1313) * Fix version that supports Python 3.6 on the README (#1316) * Add missing http version on websockets scope (#1309) * Remove Python 3.6 (#1261) * Support `extra_headers` for WS `accept` message (#1293) * Allow configurable websocket per-message-deflate setting (#1300) * Remove root_path from logs (#1294) - Update to version 0.16.0: * Version 0.16.0 (#1270) * Allow app-dir parameter on the run() function (#1271) - Update to version 0.15.0: * Added - Change reload to be configurable with glob patterns. Currently only .py files are watched, which is different from the previous default behavior. (#820) 08/08/21 - Add Python 3.10-rc.1 support. Now the server uses asyncio.run which will: start a fresh asyncio event loop, on shutdown cancel any background tasks rather than aborting them, aexit any remaining async generators, and shutdown the default ThreadPoolExecutor. (#1070) 30/07/21 - Exit with status 3 when worker starts failed (#1077) 22/06/21 - Add option to set websocket ping interval and timeout (#1048) 09/06/21 - Adapt bind_socket to make it usable with multiple processes (#1009) 21/06/21 - Add existence check to the reload directory(ies) (#1089) 21/06/21 - Add missing trace log for websocket protocols (#1083) 19/06/21 - Support disabling default Server and Date headers (#818) 11/06/21 * Changed - Add PEP440 compliant version of click (#1099) 29/06/21 - Bump asgiref to 3.4.0 (#1100) 29/06/21 * Fixed - When receiving a SIGTERM supervisors now terminate their processes before joining them (#1069) 30/07/21 - Fix the need of httptools on minimal installation (#1135) 30/07/21 - Fix ping parameters annotation in Config class (#1127) 19/07/21 - Update to version 0.14.0: * Added - Defaults ws max_size on server to 16MB (#995) 5/29/21 - Improve user feedback if no ws library installed (#926 and #1023) 2/27/21 - Support 'reason' field in 'websocket.close' messages (#957) 2/24/21 - Implemented lifespan.shutdown.failed (#755) 2/25/21 * Changed - Upgraded websockets requirements (#1065) 6/1/21 - Switch to asyncio streams API (#869) 5/29/21 - Update httptools from 0.1.* to 0.2.* (#1024) 5/28/21 - Allow Click 8.0, refs #1016 (#1042) 5/23/21 - Add search for a trusted host in ProxyHeadersMiddleware (#591) 3/13/21 - Up wsproto to 1.0.0 (#892) 2/25/21 * Fixed - Force reload_dirs to be a list (#978) 6/1/21 - Fix gunicorn worker not running if extras not installed (#901) 5/28/21 - Fix socket port 0 (#975) 3/5/21 - Prevent garbage collection of main lifespan task (#972) 3/4/21 - Update to version 0.13.0: * Add --factory flag to support factory-style application imports. (#875) 2020-12-07 50fc0d1 * Skip installation of signal handlers when not in the main thread. Allows using Server in multithreaded contexts without having to override .install_signal_handlers(). (#871) 2020-12-07 ce2ef45 OBS-URL: https://build.opensuse.org/request/show/948359 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-uvicorn?expand=0&rev=8
2022-01-24 13:29:59 +00:00
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-uvicorn
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#/uvicorn-pr1537-no-watchgod-tests.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-click >= 7.0
Requires: python-h11 >= 0.8.0
%if 0%{python_version_nodots} < 38
Requires: python-typing_extensions
%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-watchfiles >= 0.13
Suggests: python-wsproto >= 0.15.0
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module PyYAML >= 5.1}
Accepting request 948359 from home:kwk:branches:devel:languages:python - Update to version 0.17.0: * Release 0.17.0 (#1322) * Fix reload process behavior when exception is raised (#1313) * Fix version that supports Python 3.6 on the README (#1316) * Add missing http version on websockets scope (#1309) * Remove Python 3.6 (#1261) * Support `extra_headers` for WS `accept` message (#1293) * Allow configurable websocket per-message-deflate setting (#1300) * Remove root_path from logs (#1294) - Update to version 0.16.0: * Version 0.16.0 (#1270) * Allow app-dir parameter on the run() function (#1271) - Update to version 0.15.0: * Added - Change reload to be configurable with glob patterns. Currently only .py files are watched, which is different from the previous default behavior. (#820) 08/08/21 - Add Python 3.10-rc.1 support. Now the server uses asyncio.run which will: start a fresh asyncio event loop, on shutdown cancel any background tasks rather than aborting them, aexit any remaining async generators, and shutdown the default ThreadPoolExecutor. (#1070) 30/07/21 - Exit with status 3 when worker starts failed (#1077) 22/06/21 - Add option to set websocket ping interval and timeout (#1048) 09/06/21 - Adapt bind_socket to make it usable with multiple processes (#1009) 21/06/21 - Add existence check to the reload directory(ies) (#1089) 21/06/21 - Add missing trace log for websocket protocols (#1083) 19/06/21 - Support disabling default Server and Date headers (#818) 11/06/21 * Changed - Add PEP440 compliant version of click (#1099) 29/06/21 - Bump asgiref to 3.4.0 (#1100) 29/06/21 * Fixed - When receiving a SIGTERM supervisors now terminate their processes before joining them (#1069) 30/07/21 - Fix the need of httptools on minimal installation (#1135) 30/07/21 - Fix ping parameters annotation in Config class (#1127) 19/07/21 - Update to version 0.14.0: * Added - Defaults ws max_size on server to 16MB (#995) 5/29/21 - Improve user feedback if no ws library installed (#926 and #1023) 2/27/21 - Support 'reason' field in 'websocket.close' messages (#957) 2/24/21 - Implemented lifespan.shutdown.failed (#755) 2/25/21 * Changed - Upgraded websockets requirements (#1065) 6/1/21 - Switch to asyncio streams API (#869) 5/29/21 - Update httptools from 0.1.* to 0.2.* (#1024) 5/28/21 - Allow Click 8.0, refs #1016 (#1042) 5/23/21 - Add search for a trusted host in ProxyHeadersMiddleware (#591) 3/13/21 - Up wsproto to 1.0.0 (#892) 2/25/21 * Fixed - Force reload_dirs to be a list (#978) 6/1/21 - Fix gunicorn worker not running if extras not installed (#901) 5/28/21 - Fix socket port 0 (#975) 3/5/21 - Prevent garbage collection of main lifespan task (#972) 3/4/21 - Update to version 0.13.0: * Add --factory flag to support factory-style application imports. (#875) 2020-12-07 50fc0d1 * Skip installation of signal handlers when not in the main thread. Allows using Server in multithreaded contexts without having to override .install_signal_handlers(). (#871) 2020-12-07 ce2ef45 OBS-URL: https://build.opensuse.org/request/show/948359 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-uvicorn?expand=0&rev=8
2022-01-24 13:29:59 +00:00
BuildRequires: %{python_module asgiref >= 3.4}
BuildRequires: %{python_module click >= 7.0}
BuildRequires: %{python_module h11 >= 0.8.0}
BuildRequires: %{python_module httptools >= 0.4.0}
Accepting request 948359 from home:kwk:branches:devel:languages:python - Update to version 0.17.0: * Release 0.17.0 (#1322) * Fix reload process behavior when exception is raised (#1313) * Fix version that supports Python 3.6 on the README (#1316) * Add missing http version on websockets scope (#1309) * Remove Python 3.6 (#1261) * Support `extra_headers` for WS `accept` message (#1293) * Allow configurable websocket per-message-deflate setting (#1300) * Remove root_path from logs (#1294) - Update to version 0.16.0: * Version 0.16.0 (#1270) * Allow app-dir parameter on the run() function (#1271) - Update to version 0.15.0: * Added - Change reload to be configurable with glob patterns. Currently only .py files are watched, which is different from the previous default behavior. (#820) 08/08/21 - Add Python 3.10-rc.1 support. Now the server uses asyncio.run which will: start a fresh asyncio event loop, on shutdown cancel any background tasks rather than aborting them, aexit any remaining async generators, and shutdown the default ThreadPoolExecutor. (#1070) 30/07/21 - Exit with status 3 when worker starts failed (#1077) 22/06/21 - Add option to set websocket ping interval and timeout (#1048) 09/06/21 - Adapt bind_socket to make it usable with multiple processes (#1009) 21/06/21 - Add existence check to the reload directory(ies) (#1089) 21/06/21 - Add missing trace log for websocket protocols (#1083) 19/06/21 - Support disabling default Server and Date headers (#818) 11/06/21 * Changed - Add PEP440 compliant version of click (#1099) 29/06/21 - Bump asgiref to 3.4.0 (#1100) 29/06/21 * Fixed - When receiving a SIGTERM supervisors now terminate their processes before joining them (#1069) 30/07/21 - Fix the need of httptools on minimal installation (#1135) 30/07/21 - Fix ping parameters annotation in Config class (#1127) 19/07/21 - Update to version 0.14.0: * Added - Defaults ws max_size on server to 16MB (#995) 5/29/21 - Improve user feedback if no ws library installed (#926 and #1023) 2/27/21 - Support 'reason' field in 'websocket.close' messages (#957) 2/24/21 - Implemented lifespan.shutdown.failed (#755) 2/25/21 * Changed - Upgraded websockets requirements (#1065) 6/1/21 - Switch to asyncio streams API (#869) 5/29/21 - Update httptools from 0.1.* to 0.2.* (#1024) 5/28/21 - Allow Click 8.0, refs #1016 (#1042) 5/23/21 - Add search for a trusted host in ProxyHeadersMiddleware (#591) 3/13/21 - Up wsproto to 1.0.0 (#892) 2/25/21 * Fixed - Force reload_dirs to be a list (#978) 6/1/21 - Fix gunicorn worker not running if extras not installed (#901) 5/28/21 - Fix socket port 0 (#975) 3/5/21 - Prevent garbage collection of main lifespan task (#972) 3/4/21 - Update to version 0.13.0: * Add --factory flag to support factory-style application imports. (#875) 2020-12-07 50fc0d1 * Skip installation of signal handlers when not in the main thread. Allows using Server in multithreaded contexts without having to override .install_signal_handlers(). (#871) 2020-12-07 ce2ef45 OBS-URL: https://build.opensuse.org/request/show/948359 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-uvicorn?expand=0&rev=8
2022-01-24 13:29:59 +00:00
BuildRequires: %{python_module httpx >= 0.18}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
Accepting request 948359 from home:kwk:branches:devel:languages:python - Update to version 0.17.0: * Release 0.17.0 (#1322) * Fix reload process behavior when exception is raised (#1313) * Fix version that supports Python 3.6 on the README (#1316) * Add missing http version on websockets scope (#1309) * Remove Python 3.6 (#1261) * Support `extra_headers` for WS `accept` message (#1293) * Allow configurable websocket per-message-deflate setting (#1300) * Remove root_path from logs (#1294) - Update to version 0.16.0: * Version 0.16.0 (#1270) * Allow app-dir parameter on the run() function (#1271) - Update to version 0.15.0: * Added - Change reload to be configurable with glob patterns. Currently only .py files are watched, which is different from the previous default behavior. (#820) 08/08/21 - Add Python 3.10-rc.1 support. Now the server uses asyncio.run which will: start a fresh asyncio event loop, on shutdown cancel any background tasks rather than aborting them, aexit any remaining async generators, and shutdown the default ThreadPoolExecutor. (#1070) 30/07/21 - Exit with status 3 when worker starts failed (#1077) 22/06/21 - Add option to set websocket ping interval and timeout (#1048) 09/06/21 - Adapt bind_socket to make it usable with multiple processes (#1009) 21/06/21 - Add existence check to the reload directory(ies) (#1089) 21/06/21 - Add missing trace log for websocket protocols (#1083) 19/06/21 - Support disabling default Server and Date headers (#818) 11/06/21 * Changed - Add PEP440 compliant version of click (#1099) 29/06/21 - Bump asgiref to 3.4.0 (#1100) 29/06/21 * Fixed - When receiving a SIGTERM supervisors now terminate their processes before joining them (#1069) 30/07/21 - Fix the need of httptools on minimal installation (#1135) 30/07/21 - Fix ping parameters annotation in Config class (#1127) 19/07/21 - Update to version 0.14.0: * Added - Defaults ws max_size on server to 16MB (#995) 5/29/21 - Improve user feedback if no ws library installed (#926 and #1023) 2/27/21 - Support 'reason' field in 'websocket.close' messages (#957) 2/24/21 - Implemented lifespan.shutdown.failed (#755) 2/25/21 * Changed - Upgraded websockets requirements (#1065) 6/1/21 - Switch to asyncio streams API (#869) 5/29/21 - Update httptools from 0.1.* to 0.2.* (#1024) 5/28/21 - Allow Click 8.0, refs #1016 (#1042) 5/23/21 - Add search for a trusted host in ProxyHeadersMiddleware (#591) 3/13/21 - Up wsproto to 1.0.0 (#892) 2/25/21 * Fixed - Force reload_dirs to be a list (#978) 6/1/21 - Fix gunicorn worker not running if extras not installed (#901) 5/28/21 - Fix socket port 0 (#975) 3/5/21 - Prevent garbage collection of main lifespan task (#972) 3/4/21 - Update to version 0.13.0: * Add --factory flag to support factory-style application imports. (#875) 2020-12-07 50fc0d1 * Skip installation of signal handlers when not in the main thread. Allows using Server in multithreaded contexts without having to override .install_signal_handlers(). (#871) 2020-12-07 ce2ef45 OBS-URL: https://build.opensuse.org/request/show/948359 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-uvicorn?expand=0&rev=8
2022-01-24 13:29:59 +00:00
BuildRequires: %{python_module python-dotenv}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module trustme}
BuildRequires: %{python_module typing_extensions if %python-base < 3.8}
BuildRequires: %{python_module uvloop >= 0.14.0}
BuildRequires: %{python_module watchfiles >= 0.13}
BuildRequires: %{python_module websockets >= 8.0}
BuildRequires: %{python_module wsproto >= 0.15.0}
# /SECTION
%python_subpackages
%description
Uvicorn is an ASGI server implementation, using uvloop and httptools.
It supports HTTP/1.1 and WebSockets only.
%prep
%autosetup -p1 -n uvicorn-%{version}
rm setup.cfg
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/uvicorn
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative uvicorn
%postun
%python_uninstall_alternative uvicorn
%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)'
%files %{python_files}
%doc README.md
%license LICENSE.md
%python_alternative %{_bindir}/uvicorn
%{python_sitelib}/*
%changelog