python-httpcore/python-httpcore.spec
Matej Cepl e94413919d Accepting request 897159 from home:alarrosa:branches:devel:languages:python
- Update to v0.13.3
  * Added
    - Support HTTP/2 prior knowledge, using
      httpcore.SyncConnectionPool(http1=False). (Pull #333)
  * Fixed
    - Handle cases where environment does not provide select.poll
      support. (Pull #331)
- Update to v0.13.2
  * Added
    - Improve error message for specific case of
      RemoteProtocolError where server disconnects without
      sending a response. (Pull #313)
- Update to v0.13.1
  * Fixed
    - More resiliant testing for closed connections.
      (Pull #311)
    - Don't raise exceptions on ungraceful connection closes.
      (Pull #310)
- Update to v0.13.0
  * The 0.13 release updates the core API in order to match the
    HTTPX Transport API, introduced in HTTPX 0.18 onwards.
  * Changed
    - The .request() method is now handle_request(). (Pull #296)
    - The .arequest() method is now .handle_async_request().
      (Pull #296)
    - The headers argument is no longer optional. (Pull #296)
    - The stream argument is no longer optional. (Pull #296)
    - The ext argument is now named extensions, and is no longer
      optional. (Pull #296)
    - The "reason" extension keyword is now named "reason_phrase".

OBS-URL: https://build.opensuse.org/request/show/897159
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpcore?expand=0&rev=2
2021-06-03 12:45:31 +00:00

89 lines
3.0 KiB
RPMSpec

#
# spec file for package python-httpcore
#
# Copyright (c) 2021 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
Name: python-httpcore
Version: 0.13.3
Release: 0
Summary: Minimal low-level Python HTTP client
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/encode/httpcore
Source: https://github.com/encode/httpcore/archive/%{version}.tar.gz#/httpcore-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-certifi
Requires: python-chardet >= 3.0
Requires: python-h11 >= 0.11.0
Requires: python-h2 >= 3.0
Requires: python-idna >= 2.0
Requires: python-rfc3986 >= 1.0
Requires: python-sniffio >= 1.0
Recommends: python-anyio >= 3.0.1
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module anyio >= 3.0.1}
BuildRequires: %{python_module certifi}
BuildRequires: %{python_module chardet >= 3.0}
BuildRequires: %{python_module h11 >= 0.11.0}
BuildRequires: %{python_module h2 >= 3.0}
BuildRequires: %{python_module idna >= 2.0}
BuildRequires: %{python_module mitmproxy}
BuildRequires: %{python_module pproxy >= 2.7.7}
BuildRequires: %{python_module pytest >= 6.2.3}
BuildRequires: %{python_module pytest-asyncio >= 0.15.1}
BuildRequires: %{python_module pytest-curio}
BuildRequires: %{python_module pytest-tornasync}
BuildRequires: %{python_module pytest-trio >= 0.7.0}
BuildRequires: %{python_module pytest-twisted}
BuildRequires: %{python_module rfc3986 >= 1.0}
BuildRequires: %{python_module trustme >= 0.7.0}
BuildRequires: %{python_module uvicorn >= 0.12.1}
# /SECTION
%python_subpackages
%description
Python minimal low-level HTTP client.
%prep
%setup -q -n httpcore-%{version}
#sed -i 's/"localhost"/"127.0.0.1"/' tests/*sync_tests/test_interfaces.py tests/conftest.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# ulimit -n 50000
# test_no_retries and test_retries are very slow and fails
# tests/async_tests + tests/sync_tests causes open file limit
%pytest -rs -k 'not (test_interfaces or test_no_retries or test_retries or test_threadsafe_basic)'
%files %{python_files}
%doc README.md
%license LICENSE.md
%{python_sitelib}/*
%changelog