python-httpcore/python-httpcore.spec
Dirk Mueller 5d6cd3f400 Accepting request 1110138 from home:Simmphonie:branches:devel:languages:python
- update to 0.17.3 
  * Support async cancellations, ensuring that the connection pool
    is left in a clean state when cancellations occur. (#726)
  * The networking backend interface has been added to the public API.
    Some classes which were previously private implementation detail
    are now part of the top-level public API. (#699)
  * Graceful handling of HTTP/2 GoAway frames, with requests being
    transparently retried on a new connection. (#730)
  * Add exceptions when a synchronous trace callback is passed to an
    asynchronous request or an asynchronous trace callback is passed
    to a synchronous request. (#717)
- version 0.17.2
  * Add socket_options argument to ConnectionPool and HTTProxy classes. (#668)
  * Improve logging with per-module logger names. (#690)
  * Add sni_hostname request extension. (#696)
  * Resolve race condition during import of anyio package. (#692)
  * Enable TCP_NODELAY for all synchronous sockets. (#651)
- version 0.17.1
  * If 'retries' is set, then allow retries if an SSL handshake
    error occurs. (#669)
  * Improve correctness of tracebacks on network exceptions, by
    raising properly chained exceptions. (#678)
  * Prevent connection-hanging behaviour when HTTP/2 connections
    are closed by a server-sent 'GoAway' frame". (#679)
  * Fix edge-case exception when removing requests from the connection pool. (#680)
  * Fix pool timeout edge-case. (#688)

OBS-URL: https://build.opensuse.org/request/show/1110138
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpcore?expand=0&rev=24
2023-09-11 06:38:46 +00:00

96 lines
2.8 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2023 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-httpcore%{psuffix}
Version: 0.17.3
Release: 0
Summary: Minimal low-level Python HTTP client
License: BSD-3-Clause
URL: https://github.com/encode/httpcore
Source: https://github.com/encode/httpcore/archive/%{version}.tar.gz#/httpcore-%{version}.tar.gz
# PATCH-FIX-UPSTREAM httpcore-allow-deprecationwarnings-test.patch gh#encode/httpcore#511, gh#agronholm/anyio#470
Patch1: httpcore-allow-deprecationwarnings-test.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-certifi
Requires: (python-anyio >= 3 with python-anyio < 5)
Requires: (python-h11 >= 0.13.0 with python-h11 < 0.15)
Requires: (python-sniffio >= 1.0 with python-sniffio < 2)
Recommends: python-h2 >= 3.0
Recommends: python-socksio >= 1.0
BuildArch: noarch
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module Werkzeug}
BuildRequires: %{python_module h2 >= 3.0}
BuildRequires: %{python_module httpcore = %{version}}
BuildRequires: %{python_module pytest >= 7.0.1}
BuildRequires: %{python_module pytest-asyncio >= 0.16.0}
BuildRequires: %{python_module pytest-httpbin}
BuildRequires: %{python_module pytest-trio >= 0.7.0}
BuildRequires: %{python_module trio >= 0.21.0}
%endif
# /SECTION
%python_subpackages
%description
Python minimal low-level HTTP client.
%prep
%autosetup -p1 -n httpcore-%{version}
%if !%{with test}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
# we don't ship socksio
donttest="socks5"
# gh#encode/httpcore#622
donttest+=" or test_request_with_content"
%pytest -rsfE --asyncio-mode=strict -p no:unraisableexception -k "not ($donttest)"
%endif
%if !%{with test}
%files %{python_files}
%doc README.md
%license LICENSE.md
%{python_sitelib}/httpcore
%{python_sitelib}/httpcore-%{version}*-info
%endif
%changelog