Skip to content
Myr

Merge pull request #2869 from vienno/unnest-cookie-loop

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

unnest deep loop

authored by Cory Benfield · committed by Cory Benfield · parents 35170e1, f835843 · Browse files · 2 files+8 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

2 files+8 added−4 removed

  • other:+8 added−4 removed

2 files+8 added−4 removed

modified:requests/cookies.py+7 added-4 removed
141 unmodified lines
142 Wraps CookieJar.clear(), is O(n).143 """144 clearables = []145 for cookie in cookiejar:146 if cookie.name == name:147 if domain is None or domain == cookie.domain:148 if path is None or path == cookie.path:149 clearables.append((cookie.domain, cookie.path, cookie.name))146 if cookie.name != name:147 continue148 if domain is not None and domain != cookie.domain:149 continue150 if path is not None and path != cookie.path:151 continue152 clearables.append((cookie.domain, cookie.path, cookie.name))153154 for domain, path, name in clearables:155 cookiejar.clear(domain, path, name)156
329 unmodified lines
modified:AUTHORS.rst+1 added
159 unmodified lines
160- Paul van der Linden (`@pvanderlinden <https://github.com/pvanderlinden>`_)161- Colin Dickson (`@colindickson <https://github.com/colindickson>`_)162- Smiley Barry (`@smiley <https://github.com/smiley>`_)163- Shagun Sodhani (`@shagunsodhani <https://github.com/shagunsodhani>`_)164- Robin Linderborg (`@vienno <https://github.com/vienno>`_)