This commit is contained in:
SeasonedCode 2026-02-26 05:23:27 +00:00 committed by GitHub
commit e31af2ecb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1239,6 +1239,14 @@ class Cookies(typing.MutableMapping[str, str]):
)
return f"<Cookies[{cookies_repr}]>"
def __iadd__(self, other):
if isinstance(other, self.__class__):
self._cookies.update(other._cookies)
else:
raise ValueError("Cannot add a non-Cookies instance.")
return self
class _CookieCompatRequest(urllib.request.Request):
"""