commit 5c1e11000577b390f4d4f27176a686c63f736715dba6c1482708583cec27e233 Author: Markéta Machová Date: Thu Aug 21 08:31:43 2025 +0000 - Convert to libalternatives on SLE-16-based and newer systems only OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypercorn?expand=0&rev=13 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0.16.0.tar.gz b/0.16.0.tar.gz new file mode 100644 index 0000000..8db47aa --- /dev/null +++ b/0.16.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fc8578cde36f3b5a08845c2ef37ff2aafb5efcbb40be561f58405fe0b8f88de +size 159038 diff --git a/0.17.3.tar.gz b/0.17.3.tar.gz new file mode 100644 index 0000000..131d8a2 --- /dev/null +++ b/0.17.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:991221bf8df1368165a22cde98f1ae2b591aa2e65c9c72c8e03ea56a9da7f672 +size 162354 diff --git a/python-hypercorn.changes b/python-hypercorn.changes new file mode 100644 index 0000000..efb3106 --- /dev/null +++ b/python-hypercorn.changes @@ -0,0 +1,64 @@ +------------------------------------------------------------------- +Thu Aug 21 08:31:04 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Thu Jul 10 13:13:00 UTC 2025 - Markéta Machová + +- Convert to libalternatives + +------------------------------------------------------------------- +Thu Feb 27 11:55:41 UTC 2025 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Wed Dec 18 04:38:54 UTC 2024 - Steve Kowalik + +- Enable Python 3.10 builds. + +------------------------------------------------------------------- +Wed Jul 31 14:12:37 UTC 2024 - John Paul Adrian Glaubitz + +- 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 + +------------------------------------------------------------------- +Tue Apr 2 02:07:15 UTC 2024 - Steve Kowalik + +- Reflow spec file. +- Skip a test broken by new trio. + +------------------------------------------------------------------- +Thu Jan 25 11:08:52 UTC 2024 - Ben Greiner + +- Update requirements +- Skip Pythons <3.11 in order to avoid immature taskgroup backport + +------------------------------------------------------------------- +Fri Jan 12 23:06:27 UTC 2024 - vivid + +- Create package from upstream version 0.16.0 diff --git a/python-hypercorn.spec b/python-hypercorn.spec new file mode 100644 index 0000000..1cda874 --- /dev/null +++ b/python-hypercorn.spec @@ -0,0 +1,109 @@ +# +# spec file for package python-hypercorn +# +# Copyright (c) 2025 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/ +# + + +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif +%{?sle15_python_module_pythons} +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 taskgroup if %python-base < 3.11} +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 +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif +%if %{python_version_nodots} < 311 +Requires: python-exceptiongroup >= 1.1 +Requires: python-taskgroup +Requires: python-tomli +Requires: python-typing-extensions +%endif +%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 + +%pre +%python_libalternatives_reset_alternative hypercorn + +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitelib}/hypercorn +%{python_sitelib}/hypercorn-%{version}.dist-info +%python_alternative %{_bindir}/hypercorn + +%changelog