diff -r d989abe6a2ad Lib/http/cookies.py --- a/Lib/http/cookies.py Wed Oct 29 10:57:37 2014 +0100 +++ b/Lib/http/cookies.py Wed Oct 29 12:21:04 2014 +0100 @@ -486,6 +486,9 @@ class BaseCookie(dict): def __setitem__(self, key, value): """Dictionary style assignment.""" + if isinstance(value, Morsel): + # allow assignment of constructed Morsels (e.g. for pickling) + dict.__setitem__(self, key, value) rval, cval = self.value_encode(value) self.__set(key, rval, cval)