undo remove requests
# --------------------------------------------------------------------------
import datetime
import email.utils
-from ..._utils import _FixedOffset, _case_insensitive_dict
+from requests.structures import CaseInsensitiveDict
+from ..._utils import _FixedOffset
def _parse_http_date(text):
"""Parse a HTTP date format into datetime."""
@@ -57,7 +58,7 @@ def get_retry_after(response):
:return: Value of Retry-After in seconds.
:rtype: float or None
"""
- headers = _case_insensitive_dict(**response.http_response.headers)
+ headers = CaseInsensitiveDict(response.http_response.headers)
retry_after = headers.get("retry-after")
if retry_after:
return parse_retry_after(retry_after)
