public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-unixsocket/files/, dev-python/requests-unixsocket/
Date: Sat, 15 Jun 2024 13:47:35 +0000 (UTC)	[thread overview]
Message-ID: <1718459248.0595d6be93229997ecfa9e1a29cc6dc571317862.mgorny@gentoo> (raw)

commit:     0595d6be93229997ecfa9e1a29cc6dc571317862
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 15 13:41:12 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 15 13:47:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0595d6be

dev-python/requests-unixsocket: Fix compat with newer requests

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 ...requests-unixsocket-0.3.0-requests-2.32.2.patch | 25 ++++++++++++++++++++++
 .../requests-unixsocket-0.3.0-r4.ebuild            |  5 ++++-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/dev-python/requests-unixsocket/files/requests-unixsocket-0.3.0-requests-2.32.2.patch b/dev-python/requests-unixsocket/files/requests-unixsocket-0.3.0-requests-2.32.2.patch
new file mode 100644
index 000000000000..eb7b8f5df7b3
--- /dev/null
+++ b/dev-python/requests-unixsocket/files/requests-unixsocket-0.3.0-requests-2.32.2.patch
@@ -0,0 +1,25 @@
+From 8b02ed531d8def03b4cf767e8a925be09db43dff Mon Sep 17 00:00:00 2001
+From: Simon Deziel <simon.deziel@canonical.com>
+Date: Wed, 22 May 2024 12:02:20 -0400
+Subject: [PATCH] adapters: fix for requests 2.32.2+
+
+Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
+---
+ requests_unixsocket/adapters.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/requests_unixsocket/adapters.py b/requests_unixsocket/adapters.py
+index 83e1400..c3c73cc 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)

diff --git a/dev-python/requests-unixsocket/requests-unixsocket-0.3.0-r4.ebuild b/dev-python/requests-unixsocket/requests-unixsocket-0.3.0-r4.ebuild
index 1af801834bff..fb11398447dc 100644
--- a/dev-python/requests-unixsocket/requests-unixsocket-0.3.0-r4.ebuild
+++ b/dev-python/requests-unixsocket/requests-unixsocket-0.3.0-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2020-2023 Gentoo Authors
+# Copyright 2020-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -10,6 +10,7 @@ PYTHON_COMPAT=( python3_{10..12} pypy3 )
 inherit distutils-r1 pypi
 
 DESCRIPTION="Use requests to talk HTTP via a UNIX domain socket"
+# TODO: replace with requests-unixsocket2?
 HOMEPAGE="
 	https://github.com/msabramo/requests-unixsocket/
 	https://pypi.org/project/requests-unixsocket/
@@ -33,6 +34,8 @@ BDEPEND="
 PATCHES=(
 	# https://github.com/msabramo/requests-unixsocket/pull/69
 	"${FILESDIR}/${P}-urllib3-2.patch"
+	# https://github.com/msabramo/requests-unixsocket/pull/72
+	"${FILESDIR}/${P}-requests-2.32.2.patch"
 )
 
 distutils_enable_tests pytest


             reply	other threads:[~2024-06-15 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-15 13:47 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-21  4:59 [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-unixsocket/files/, dev-python/requests-unixsocket/ Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1718459248.0595d6be93229997ecfa9e1a29cc6dc571317862.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox