From cc8c22223f0ad0a519cf912e70351ac94c01ed64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 10 Dec 2024 14:51:17 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python-requests-unixsocket revision a17b356f0b342415006503d4172a7306 --- python-requests-unixsocket.changes | 13 +++++++++++++ python-requests-unixsocket.spec | 5 ++++- requests232.patch | 25 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 requests232.patch diff --git a/python-requests-unixsocket.changes b/python-requests-unixsocket.changes index f8cbc53..5fb623e 100644 --- a/python-requests-unixsocket.changes +++ b/python-requests-unixsocket.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu May 23 08:28:38 UTC 2024 - Markéta Machová + +- Add requests232.patch to fix compatibility with new requests +- The project appears unmaintained + * living fork: https://gitlab.com/thelabnyc/requests-unixsocket2 + * patching here for expediency reasons + +------------------------------------------------------------------- +Sat Jun 10 09:24:04 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + ------------------------------------------------------------------- Tue May 9 11:44:12 UTC 2023 - Daniel Garcia diff --git a/python-requests-unixsocket.spec b/python-requests-unixsocket.spec index f225d1d..19f45f3 100644 --- a/python-requests-unixsocket.spec +++ b/python-requests-unixsocket.spec @@ -1,7 +1,7 @@ # # spec file for package python-requests-unixsocket # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%{?sle15_python_module_pythons} Name: python-requests-unixsocket Version: 0.3.0 Release: 0 @@ -26,6 +27,8 @@ URL: https://github.com/msabramo/requests-unixsocket Source: https://files.pythonhosted.org/packages/source/r/requests-unixsocket/requests-unixsocket-%{version}.tar.gz # PATCH-FIX-UPSTREAM urllib3-2.patch -- gh#msabramo/requests-unixsocket#69 Patch0: urllib3-2.patch +# PATCH-FIX-UPSTREAM https://github.com/msabramo/requests-unixsocket/pull/72 adapters: fix for requests 2.32.2+ +Patch1: requests232.patch BuildRequires: %{python_module pbr} BuildRequires: %{python_module setuptools} BuildRequires: fdupes diff --git a/requests232.patch b/requests232.patch new file mode 100644 index 0000000..cebca7c --- /dev/null +++ b/requests232.patch @@ -0,0 +1,25 @@ +From 24811e26b049602bc70fdf6d91e39424200a95ad Mon Sep 17 00:00:00 2001 +From: Simon Deziel +Date: Wed, 22 May 2024 12:02:20 -0400 +Subject: [PATCH] adapters: fix for requests 2.32.2+ + +Signed-off-by: Simon Deziel +--- + requests_unixsocket/adapters.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/requests_unixsocket/adapters.py b/requests_unixsocket/adapters.py +index 83e1400..4ef7174 100644 +--- a/requests_unixsocket/adapters.py ++++ b/requests_unixsocket/adapters.py +@@ -63,6 +63,10 @@ def __init__(self, timeout=60, pool_connections=25, *args, **kwargs): + pool_connections, dispose_func=lambda p: p.close() + ) + ++ # Fix for requests 2.32.2+: https://github.com/psf/requests/pull/6710 ++ def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None): ++ return self.get_connection(request.url, proxies) ++ + def get_connection(self, url, proxies=None): + proxies = proxies or {} + proxy = proxies.get(urlparse(url.lower()).scheme)