mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Make compatible with requests 2.29.0 and urllib3 2.0 (#613)
* Make compatible with requests 2.29.0. * This fix should also work with urllib3 2.0 according to urllib3 maintainer. * Add changelog fragment. * We still need the constraint for CI until Docker SDK for Python has a new release with a fix. * Make modifications to response_class as small as possible. * Revert "We still need the constraint for CI until Docker SDK for Python has a new release with a fix." This reverts commit 698d544a1e08308e8bf8b4e56ab78c5079f9a17b. * The pip coming with the ansible-core 2.11 alpine3 image seems to be too old.
This commit is contained in:
@@ -24,12 +24,7 @@ from ansible.module_utils.six.moves.urllib_parse import urlparse
|
||||
from .basehttpadapter import BaseHTTPAdapter
|
||||
from .. import constants
|
||||
|
||||
if PY3:
|
||||
import http.client as httplib
|
||||
else:
|
||||
import httplib
|
||||
|
||||
from .._import_helper import HTTPAdapter, urllib3
|
||||
from .._import_helper import HTTPAdapter, urllib3, urllib3_connection
|
||||
|
||||
PARAMIKO_IMPORT_ERROR = None
|
||||
try:
|
||||
@@ -120,7 +115,7 @@ class SSHSocket(socket.socket):
|
||||
self.proc.terminate()
|
||||
|
||||
|
||||
class SSHConnection(httplib.HTTPConnection, object):
|
||||
class SSHConnection(urllib3_connection.HTTPConnection, object):
|
||||
def __init__(self, ssh_transport=None, timeout=60, host=None):
|
||||
super(SSHConnection, self).__init__(
|
||||
'localhost', timeout=timeout
|
||||
|
||||
Reference in New Issue
Block a user