Skip to content
Myr

Remove ability to from RequestCookieJar __getitem__, __setitem__ to use cookies as keys

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Chase Sterling · committed by Chase Sterling · parent 87d9d96 · Browse files · 1 file+0 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−4 removed

  • other:+0 added−4 removed

1 file+0 added−4 removed

modified:requests/cookies.py-4 removed
238 unmodified lines
239 def __getitem__(self, name):240 """Dict-like __getitem__() for compatibility with client code. Throws exception241 if there are more than one cookie with name. In that case, use the more242 explicit get() method instead. Caution: operation is O(n), not O(1)."""243 if isinstance(name, cookielib.Cookie):244 name = name.name243244 return self._find_no_duplicates(name)245246 def __setitem__(self, name, value):247 """Dict-like __setitem__ for compatibility with client code. Throws exception248 if there is already a cookie of that name in the jar. In that case, use the more249 explicit set() method instead."""252 if isinstance(name, cookielib.Cookie):253 name = name.name250251 self.set(name, value)252253 def __delitem__(self, name):
130 unmodified lines