revert to older requests version

This commit is contained in:
AdeHub
2019-07-15 13:54:34 +12:00
parent 3ab31f1da7
commit 5d145b6f8a
140 changed files with 12319 additions and 24925 deletions
+9 -8
View File
@@ -5,16 +5,18 @@ requests.structures
~~~~~~~~~~~~~~~~~~~
Data structures that power Requests.
"""
from .compat import OrderedDict, Mapping, MutableMapping
import collections
class CaseInsensitiveDict(MutableMapping):
"""A case-insensitive ``dict``-like object.
class CaseInsensitiveDict(collections.MutableMapping):
"""
A case-insensitive ``dict``-like object.
Implements all methods and operations of
``MutableMapping`` as well as dict's ``copy``. Also
``collections.MutableMapping`` as well as dict's ``copy``. Also
provides ``lower_items``.
All keys are expected to be strings. The structure remembers the
@@ -35,10 +37,10 @@ class CaseInsensitiveDict(MutableMapping):
If the constructor, ``.update``, or equality comparison
operations are given keys that have equal ``.lower()``s, the
behavior is undefined.
"""
"""
def __init__(self, data=None, **kwargs):
self._store = OrderedDict()
self._store = dict()
if data is None:
data = {}
self.update(data, **kwargs)
@@ -69,7 +71,7 @@ class CaseInsensitiveDict(MutableMapping):
)
def __eq__(self, other):
if isinstance(other, Mapping):
if isinstance(other, collections.Mapping):
other = CaseInsensitiveDict(other)
else:
return NotImplemented
@@ -83,7 +85,6 @@ class CaseInsensitiveDict(MutableMapping):
def __repr__(self):
return str(dict(self.items()))
class LookupDict(dict):
"""Dictionary lookup object."""