summaryrefslogtreecommitdiff
path: root/dev-python/requests-unixsocket
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-10-16 18:42:09 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2023-10-16 18:42:09 +0000
commite12e079d1d498ff525729f9e99dcaebcaafefd2e (patch)
tree963d27692152e759128819ae63c51a8c29a4b563 /dev-python/requests-unixsocket
parentc17b94d3a30692facd01f74b45895612f711137c (diff)
downloadbaldeagleos-repo-e12e079d1d498ff525729f9e99dcaebcaafefd2e.tar.gz
baldeagleos-repo-e12e079d1d498ff525729f9e99dcaebcaafefd2e.tar.xz
baldeagleos-repo-e12e079d1d498ff525729f9e99dcaebcaafefd2e.zip
Adding metadata
Diffstat (limited to 'dev-python/requests-unixsocket')
-rw-r--r--dev-python/requests-unixsocket/.audit1
-rw-r--r--dev-python/requests-unixsocket/Manifest1
-rw-r--r--dev-python/requests-unixsocket/files/requests-unixsocket-0.3.0-urllib3-2.patch45
-rw-r--r--dev-python/requests-unixsocket/metadata.xml6
-rw-r--r--dev-python/requests-unixsocket/requests-unixsocket-0.2.0.ebuild24
-rw-r--r--dev-python/requests-unixsocket/requests-unixsocket-0.3.0-r4.ebuild38
-rw-r--r--dev-python/requests-unixsocket/requests-unixsocket-0.3.0.ebuild24
7 files changed, 86 insertions, 53 deletions
diff --git a/dev-python/requests-unixsocket/.audit b/dev-python/requests-unixsocket/.audit
deleted file mode 100644
index 0c78f22ca7a8..000000000000
--- a/dev-python/requests-unixsocket/.audit
+++ /dev/null
@@ -1 +0,0 @@
-FL-4281. dependency for pylxd, not present in gentoo portage tree.
diff --git a/dev-python/requests-unixsocket/Manifest b/dev-python/requests-unixsocket/Manifest
index bf4f576cc087..55e09370ea47 100644
--- a/dev-python/requests-unixsocket/Manifest
+++ b/dev-python/requests-unixsocket/Manifest
@@ -1,2 +1 @@
-DIST requests-unixsocket-0.2.0.tar.gz 13303 BLAKE2B cda02b5d963b00fb06cf86819bcbf552ecc21e30064198da338f502f47547a1f93184fd06052047c6cb8a6181f0a2f7b7a7cc53183b18dc22165a41dc14144b5 SHA512 a670f136ff1d8fb427cd017d92d388fd48a8a853d50aaa6eed685f3b453e28c6dbf5a710d7394face3eec42f8bdd84f798c7c4c82dab7b53d7a8c229ade52405
DIST requests-unixsocket-0.3.0.tar.gz 14478 BLAKE2B 5b46ea051729326498f50ba7a952429d271deb102060f8e3019d259ddc21dbffdca8960e140c7ccb25898034cf37fb90dd143c970e75bdc6e6442e9515f14d6e SHA512 21c887b0c3fa526a2debb3960e0ea4dc3b3015cdd517459b6484501176321408d1b4c87dd2840c7d8b71d08fa9114f655ae03f8bc9ff1fca33c914900ef82f5b
diff --git a/dev-python/requests-unixsocket/files/requests-unixsocket-0.3.0-urllib3-2.patch b/dev-python/requests-unixsocket/files/requests-unixsocket-0.3.0-urllib3-2.patch
new file mode 100644
index 000000000000..3cbcd2dd59d3
--- /dev/null
+++ b/dev-python/requests-unixsocket/files/requests-unixsocket-0.3.0-urllib3-2.patch
@@ -0,0 +1,45 @@
+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
diff --git a/dev-python/requests-unixsocket/metadata.xml b/dev-python/requests-unixsocket/metadata.xml
index 36acccda7221..a0d4c5913ba0 100644
--- a/dev-python/requests-unixsocket/metadata.xml
+++ b/dev-python/requests-unixsocket/metadata.xml
@@ -2,9 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
+ <email>python@gentoo.org</email>
</maintainer>
- <origin>ports</origin>
+ <origin>gentoo-staging</origin>
+ <stabilize-allarches/>
</pkgmetadata> \ No newline at end of file
diff --git a/dev-python/requests-unixsocket/requests-unixsocket-0.2.0.ebuild b/dev-python/requests-unixsocket/requests-unixsocket-0.2.0.ebuild
deleted file mode 100644
index 11a0dc384bae..000000000000
--- a/dev-python/requests-unixsocket/requests-unixsocket-0.2.0.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2020-2021 by Liguros authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9,10,11} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Use requests to talk HTTP via a UNIX domain socket"
-HOMEPAGE="https://pypi.python.org/pypi/requests-unixsocket https://github.com/msabramo/requests-unixsocket"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE=""
-
-RDEPEND=""
-DEPEND="
- dev-python/pbr[${PYTHON_USEDEP}]
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/urllib3[${PYTHON_USEDEP}]
-"
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
new file mode 100644
index 000000000000..14f69bce7cc3
--- /dev/null
+++ b/dev-python/requests-unixsocket/requests-unixsocket-0.3.0-r4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2020-2023 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_{8,9,10,11} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Use requests to talk HTTP via a UNIX domain socket"
+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 ~ia64 ~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"
+)
+
+distutils_enable_tests pytest
diff --git a/dev-python/requests-unixsocket/requests-unixsocket-0.3.0.ebuild b/dev-python/requests-unixsocket/requests-unixsocket-0.3.0.ebuild
deleted file mode 100644
index 3d01c69394d3..000000000000
--- a/dev-python/requests-unixsocket/requests-unixsocket-0.3.0.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2020-2021 by Liguros authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8,9,10,11} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Use requests to talk HTTP via a UNIX domain socket"
-HOMEPAGE="https://pypi.python.org/pypi/requests-unixsocket https://github.com/msabramo/requests-unixsocket"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE=""
-
-RDEPEND=""
-DEPEND="
- dev-python/pbr[${PYTHON_USEDEP}]
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- dev-python/urllib3[${PYTHON_USEDEP}]
-"