Accepting request 1045069 from home:bnavigator:branches:devel:languages:python

- Update to 0.16.3
  * Allow ws and wss schemes. Allows us to properly support
    websocket upgrade connections. (#625)
  * Forwarding HTTP proxies use a connection-per-remote-host.
    Required by some proxy implementations. (#637)
  * Don't raise RuntimeError when closing a connection pool with
    active connections. Removes some error cases when cancellations
    are used. (#631)
  * Lazy import anyio, so that it's no longer a hard dependancy,
    and isn't imported if unused. (#639)
- Add httpcore-allow-deprecationwarnings-test.patch
  gh#encode/httpcore#511, gh#agronholm/anyio#470

OBS-URL: https://build.opensuse.org/request/show/1045069
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpcore?expand=0&rev=18
This commit is contained in:
Matej Cepl 2022-12-24 00:51:24 +00:00 committed by Git OBS Bridge
parent 532fc84885
commit dbe5286cde
5 changed files with 51 additions and 18 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:828251980716e4406beceb5e7dac428ad12e608a811caeaf5967293a421590ec
size 78091

BIN
httpcore-0.16.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,17 @@
Index: httpcore-0.16.3/setup.cfg
===================================================================
--- httpcore-0.16.3.orig/setup.cfg
+++ httpcore-0.16.3/setup.cfg
@@ -30,6 +30,12 @@ markers =
copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup
filterwarnings =
error
+ # requires anyio 4 with trio 0.22: https://github.com/agronholm/anyio/issues/470
+ ignore:trio.MultiError is deprecated
+ # fixed by pytest-httpbin (2.0 not released yet): https://github.com/encode/httpcore/pull/511
+ ignore:unclosed <(socket\.socket|ssl\.SSLSocket) .*:ResourceWarning
+ ignore:ssl\.wrap_socket\(\) is deprecated, use SSLContext\.wrap_socket\(\):DeprecationWarning
+ ignore:ssl\.PROTOCOL_TLS is deprecated:DeprecationWarning
[coverage:run]
omit = venv/*, httpcore/_sync/*

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Fri Dec 23 17:57:37 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.16.3
* Allow ws and wss schemes. Allows us to properly support
websocket upgrade connections. (#625)
* Forwarding HTTP proxies use a connection-per-remote-host.
Required by some proxy implementations. (#637)
* Don't raise RuntimeError when closing a connection pool with
active connections. Removes some error cases when cancellations
are used. (#631)
* Lazy import anyio, so that it's no longer a hard dependancy,
and isn't imported if unused. (#639)
- Add httpcore-allow-deprecationwarnings-test.patch
gh#encode/httpcore#511, gh#agronholm/anyio#470
-------------------------------------------------------------------
Mon Dec 19 10:11:16 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -26,20 +26,22 @@
%endif
Name: python-httpcore%{psuffix}
Version: 0.16.1
Version: 0.16.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-anyio >= 3
Requires: python-certifi
Requires: python-h11 >= 0.13.0
Requires: python-sniffio >= 1.0
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
@ -52,7 +54,7 @@ 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.19.0}
BuildRequires: %{python_module trio >= 0.21.0}
%endif
# /SECTION
%python_subpackages
@ -61,26 +63,24 @@ BuildRequires: %{python_module trio >= 0.19.0}
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
%autosetup -p1 -n httpcore-%{version}
%if !%{with test}
%build
%python_build
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%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
# socks5 -- we don't ship socksio
# gh#encode/httpcore#622 - test_request_with_content
%if %{with test}
%pytest -rs -k 'not (test_interfaces or test_no_retries or test_retries or test_threadsafe_basic or test_request_with_content or socks5)' --asyncio-mode=strict
%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}