From f388c6f371dcacdb950e2e1c68a5362ef9863986 Mon Sep 17 00:00:00 2001
From: Thomas Goirand <zigo@debian.org>
Date: Mon, 26 Aug 2024 17:03:09 +0200
Subject: [PATCH]   * Add requests-2.32.2.patch, thanks to Colin Watson
 <cjwatson@debian.org>     (Closes: #1073393).

---
 debian/changelog                     |  7 +++++++
 debian/patches/requests-2.32.2.patch | 19 +++++++++++++++++++
 debian/patches/series                |  1 +
 3 files changed, 27 insertions(+)
 create mode 100644 debian/patches/requests-2.32.2.patch

diff --git a/debian/changelog b/debian/changelog
index 180c782..e582469 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-requests-unixsocket (0.3.0-5) unstable; urgency=medium
+
+  * Add requests-2.32.2.patch, thanks to Colin Watson <cjwatson@debian.org>
+    (Closes: #1073393).
+
+ -- Thomas Goirand <zigo@debian.org>  Mon, 26 Aug 2024 17:02:36 +0200
+
 python-requests-unixsocket (0.3.0-4) unstable; urgency=medium
 
   * Apply Ubuntu patch (Closes: #1063892):
diff --git a/debian/patches/requests-2.32.2.patch b/debian/patches/requests-2.32.2.patch
new file mode 100644
index 0000000..64f49ec
--- /dev/null
+++ b/debian/patches/requests-2.32.2.patch
@@ -0,0 +1,19 @@
+Description: adapters: fix for requests 2.32.2+
+Author: Simon Deziel <simon.deziel@canonical.com>
+Origin: other, https://github.com/msabramo/requests-unixsocket/pull/72
+Bug-Debian: https://bugs.debian.org/1073393
+Last-Update: 2024-08-16
+
+--- python-requests-unixsocket-0.3.0.orig/requests_unixsocket/adapters.py
++++ python-requests-unixsocket-0.3.0/requests_unixsocket/adapters.py
+@@ -58,6 +58,10 @@ class UnixAdapter(HTTPAdapter):
+             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)
diff --git a/debian/patches/series b/debian/patches/series
index 1c1e0a8..e010b22 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Inherit-HTTPConnection-through-urllib3.connection-no.patch
 testutils-fix-test-flake-on-HEAD-request.patch
+requests-2.32.2.patch
-- 
GitLab