dev-python/requests-unixsocket: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2025-03-22 12:29:12 +01:00
parent a17dd0204f
commit e8a650cb0f
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
4 changed files with 0 additions and 112 deletions

View File

@ -1,2 +1 @@
DIST requests-unixsocket-0.3.0.tar.gz 14478 BLAKE2B 5b46ea051729326498f50ba7a952429d271deb102060f8e3019d259ddc21dbffdca8960e140c7ccb25898034cf37fb90dd143c970e75bdc6e6442e9515f14d6e SHA512 21c887b0c3fa526a2debb3960e0ea4dc3b3015cdd517459b6484501176321408d1b4c87dd2840c7d8b71d08fa9114f655ae03f8bc9ff1fca33c914900ef82f5b
DIST requests_unixsocket-0.4.1.tar.gz 23476 BLAKE2B a0a118e0fb8060e20389aaf170c8e1cedaca2d5d721af1195e98ccebc0de55a4d341baf74e88d860402f7f80744f86ba754da7aac4d66334e01d5328126bf574 SHA512 633dbe9217e3e521271012643afd874c602c2ec204da8b4fdabd1bd5e0ccdf69c86060edc11d5a2037d8acb57a84cbbac447949cc92438bd6c5302275442287e

View File

@ -1,25 +0,0 @@
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)

View File

@ -1,45 +0,0 @@
From 5a614f60e7b3639758a6b77691b4e0c0d6827e94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Roukala=20=28n=C3=A9=20Peres=29?=
<martin.roukala@mupuf.org>
Date: Fri, 5 May 2023 09:23:41 +0300
Subject: [PATCH] Inherit HTTPConnection through urllib3.connection, not
httplib
By inheriting from `urllib3.connection.HTTPConnection` (that inherits
from `httplib.HTTPConnection` itself), we can adapt to the internal
changes in urllib3 2.0 that added a `request()` method that is
incompatible with httplib.HTTPConnection.request.
This fixes the incompatibility between urllib3 2.0 and requests 1.26+,
which was the first version that stopped vendoring urllib3.
Reference: https://github.com/docker/docker-py/issues/3113#issuecomment-1531570788
---
requests_unixsocket/adapters.py | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/requests_unixsocket/adapters.py b/requests_unixsocket/adapters.py
index 83e1400..513c243 100644
--- a/requests_unixsocket/adapters.py
+++ b/requests_unixsocket/adapters.py
@@ -3,11 +3,6 @@
from requests.adapters import HTTPAdapter
from requests.compat import urlparse, unquote
-try:
- import http.client as httplib
-except ImportError:
- import httplib
-
try:
from requests.packages import urllib3
except ImportError:
@@ -16,7 +11,7 @@
# The following was adapted from some code from docker-py
# https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py
-class UnixHTTPConnection(httplib.HTTPConnection, object):
+class UnixHTTPConnection(urllib3.connection.HTTPConnection, object):
def __init__(self, unix_socket_url, timeout=60):
"""Create an HTTP connection to a unix domain socket

View File

@ -1,41 +0,0 @@
# Copyright 2020-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
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/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
RDEPEND="
dev-python/requests[${PYTHON_USEDEP}]
dev-python/urllib3[${PYTHON_USEDEP}]
"
BDEPEND="
dev-python/pbr[${PYTHON_USEDEP}]
test? (
dev-python/waitress[${PYTHON_USEDEP}]
)
"
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