Skip to content

Commit 316b1cc

Browse files
authored
Allow use of latest urllib3 (#1556)
vcrpy works with the latest version now.
1 parent 478d4ba commit 316b1cc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ package_dir=
3939
include_package_data = True
4040
python_requires = >=3.7
4141
install_requires =
42-
urllib3>=1.15,<2.0
42+
urllib3>=1.15
4343
certifi
4444
python-dateutil
4545
typing-extensions

src/datadog_api_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _call_api(
133133

134134
if return_http_data_only:
135135
return return_data
136-
return (return_data, response.status, response.headers.copy())
136+
return (return_data, response.status, dict(response.headers))
137137

138138
def parameters_to_multipart(self, params):
139139
"""Get parameters as list of tuples, formatting as json if value is dict.

src/datadog_api_client/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def __init__(self, status=None, reason=None, http_resp=None):
9696
self.body = json.loads(http_resp.data)
9797
except Exception:
9898
self.body = http_resp.data.decode("utf-8")
99-
self.headers = http_resp.headers.copy()
99+
self.headers = dict(http_resp.headers)
100100
else:
101101
self.status = status
102102
self.reason = reason

0 commit comments

Comments
 (0)