14
0
Files
python-hypercorn/python-hypercorn.spec
Markéta Machová b36c84dfb1 Accepting request 1190693 from home:glaubitz:branches:devel:languages:python
- Update to 0.17.3
  * Restore set TCP_NODELAY on TCP sockets
  * Support uvloop >= 0.18 and the loop_factory argument
  * Bugfix ensure ExceptionGroup lifespan failures crash the server.
- from version 0.17.2
  * Bugfix pass the correct quic connection to the H3 Protocol.
- from version 0.17.1
  * Bugfix revert set TCP_NODELAY on sockets.
- from version 0.17.0
  * Set TCP_NODELAY on sockets.
  * Support sending trailing headers on h2/h3.
  * Add support for lifespan state.
  * Allow sending of the response before body data arrives.
  * Bugfix properly set host header to ascii string in
    ProxyFixMiddleware.
  * Bugfix encode headers using latin-1.
  * Bugfix don't double-access log if the response was sent.
  * Bugfix a statsd logging bug.
  * Bugfix handle already-closed on StreamEnded.
  * Bugfix send a 400 response if data is received before the websocket
    is accepted.
  * Bugfix ensure only a single QUIC timer task per connection.
  * Bugfix ensure responses are sent with empty bodies for WSGI.
- Update BuildRequires and Requires from pyproject.toml

OBS-URL: https://build.opensuse.org/request/show/1190693
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypercorn?expand=0&rev=5
2024-08-01 08:36:54 +00:00

89 lines
3.0 KiB
RPMSpec

#
# spec file for package python-hypercorn
#
# 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
# 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/
#
# avoid taskgroup backports
%define skip_python310 1
Name: python-hypercorn
Version: 0.17.3
Release: 0
Summary: A ASGI Server based on Hyper libraries and inspired by Gunicorn
License: MIT
URL: https://github.com/pgjones/hypercorn/
Source: https://github.com/pgjones/hypercorn/archive/refs/tags/%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module h11}
BuildRequires: %{python_module h2 >= 3.1.0}
BuildRequires: %{python_module httpx}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core >= 1}
BuildRequires: %{python_module priority}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-trio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module trio >= 0.22.0}
BuildRequires: %{python_module wsproto >= 0.14.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-h11
Requires: python-h2 >= 3.1.0
Requires: python-priority
Requires: python-wsproto >= 0.14.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Hypercorn is an `ASGI and WSGI web server based on the sans-io hyper, h11, h2,
and wsproto libraries and inspired by Gunicorn. Hypercorn supports HTTP/1,
HTTP/2, WebSockets (over HTTP/1 and HTTP/2), ASGI, and WSGI specifications.
Hypercorn can utilise asyncio, uvloop, or trio worker types.
%prep
%autosetup -p1 -n hypercorn-%{version}
sed -i 's/--no-cov-on-fail//' pyproject.toml
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}/%{$python_sitelib}
%python_clone -a %{buildroot}/%{_bindir}/hypercorn
%python_expand chmod -x %{buildroot}/%{$python_sitelib}/hypercorn/protocol/__init__.py
%python_expand chmod -x %{buildroot}/%{$python_sitelib}/hypercorn/protocol/h11.py
%python_expand chmod -x %{buildroot}/%{$python_sitelib}/hypercorn/protocol/h2.py
%check
# Broken with new trio
%pytest -k 'not test_startup_failure'
%post
%python_install_alternative hypercorn
%postun
%python_uninstall_alternative hypercorn
%files %{python_files}
%{python_sitelib}/hypercorn
%{python_sitelib}/hypercorn-%{version}.dist-info
%python_alternative %{_bindir}/hypercorn
%changelog