-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update python-requests-unixsocket to version 0.3.0 / rev 5 via SR 108…
…5688 https://build.opensuse.org/request/show/1085688 by user dgarcia + dimstar_suse - Add urllib3-2.patch to make it compatible with urllib3 >= 2.0.0 gh#msabramo/requests-unixsocket#69
- Loading branch information
1 parent
0411ceb
commit b713545
Showing
5 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
packages/p/python-requests-unixsocket/python-requests-unixsocket.changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Tue May 9 11:44:12 UTC 2023 - Daniel Garcia <[email protected]> | ||
|
||
- Add urllib3-2.patch to make it compatible with urllib3 >= 2.0.0 | ||
gh#msabramo/requests-unixsocket#69 | ||
|
||
------------------------------------------------------------------- | ||
Mon Jan 10 22:30:46 UTC 2022 - Dirk Müller <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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?= | ||
<[email protected]> | ||
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(-) | ||
|
||
Index: requests-unixsocket-0.3.0/requests_unixsocket/adapters.py | ||
=================================================================== | ||
--- requests-unixsocket-0.3.0.orig/requests_unixsocket/adapters.py | ||
+++ requests-unixsocket-0.3.0/requests_unixsocket/adapters.py | ||
@@ -4,11 +4,6 @@ from requests.adapters import HTTPAdapte | ||
from requests.compat import urlparse, unquote | ||
|
||
try: | ||
- import http.client as httplib | ||
-except ImportError: | ||
- import httplib | ||
- | ||
-try: | ||
from requests.packages import urllib3 | ||
except ImportError: | ||
import urllib3 | ||
@@ -16,7 +11,7 @@ except ImportError: | ||
|
||
# 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 |