[issue20804] Sentinels identity lost when pickled (unittest.mock)

Serhiy Storchaka report at bugs.python.org
Tue Jan 10 16:38:04 EST 2017


Serhiy Storchaka added the comment:

Sorry, I had wrote this patch for issue29229 and didn't read the above discussion.

Copying and pickling preserve identity of some objects: functions, classes, enums, builtin singletons (None, False, True, ...). It was not obvious to me that this shouldn't work with mock sentinels.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20804>
_______________________________________


More information about the Python-bugs-list mailing list