Accepting request 1120297 from devel:languages:python

- Update to 0.18.0:
  - Add support for HTTPS proxies.
  - Handle sni_hostname extension with SOCKS proxy.
  - Change the type of Extensions from Mapping[Str, Any] to
    MutableMapping[Str, Any].
  - Handle HTTP/1.1 half-closed connections gracefully.
  - Drop Python 3.7 support.
- Update httpcore-allow-deprecationwarnings-test.patch
- Skip failing tests test_ssl_request and test_extra_info
  (gh#encode/httpcore!832)

OBS-URL: https://build.opensuse.org/request/show/1120297
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-httpcore?expand=0&rev=12
This commit is contained in:
Ana Guerrero 2023-10-26 15:11:47 +00:00 committed by Git OBS Bridge
commit 4fad8f47c5
5 changed files with 46 additions and 23 deletions

View File

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

3
httpcore-0.18.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0280df5defe0091029f2dbbfb50c4107597e78f8cc0d24577c4d99acb6621692
size 94594

View File

@ -1,17 +1,21 @@
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
---
pyproject.toml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -86,7 +86,13 @@ ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = ["-rxXs", "--strict-config", "--strict-markers"]
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"]
+filterwarnings = [
+ "error",
+ "ignore:trio.MultiError is deprecated",
+ "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/*
[tool.coverage.run]
omit = [

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Wed Oct 25 11:30:12 UTC 2023 - Matej Cepl <mcepl@cepl.eu>
- Update to 0.18.0:
- Add support for HTTPS proxies.
- Handle sni_hostname extension with SOCKS proxy.
- Change the type of Extensions from Mapping[Str, Any] to
MutableMapping[Str, Any].
- Handle HTTP/1.1 half-closed connections gracefully.
- Drop Python 3.7 support.
- Update httpcore-allow-deprecationwarnings-test.patch
- Skip failing tests test_ssl_request and test_extra_info
(gh#encode/httpcore!832)
-------------------------------------------------------------------
Sun Sep 10 11:05:24 UTC 2023 - Torsten Gruner <simmphonie@opensuse.org>

View File

@ -27,7 +27,7 @@
%{?sle15_python_module_pythons}
Name: python-httpcore%{psuffix}
Version: 0.17.3
Version: 0.18.0
Release: 0
Summary: Minimal low-level Python HTTP client
License: BSD-3-Clause
@ -36,7 +36,10 @@ Source: https://github.com/encode/httpcore/archive/%{version}.tar.gz#/ht
# 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: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-certifi
@ -68,10 +71,10 @@ Python minimal low-level HTTP client.
%if !%{with test}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@ -81,6 +84,8 @@ Python minimal low-level HTTP client.
donttest="socks5"
# gh#encode/httpcore#622
donttest+=" or test_request_with_content"
# gh#encode/httpcore!832
donttest+=" or test_ssl_request or test_extra_info"
%pytest -rsfE --asyncio-mode=strict -p no:unraisableexception -k "not ($donttest)"
%endif