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

Serhiy Storchaka report at bugs.python.org
Tue Jan 10 15:20:06 EST 2017


Serhiy Storchaka added the comment:

Proposed patch makes mock sentinels supporting pickling and copying. This allows passing them in multiprocessing.

I'm not sure whether this is a bug fix or a new feature.

The patch works only with 3.5+. Older versions need more complex solution.

----------
keywords: +patch
nosy: +serhiy.storchaka
stage:  -> patch review
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file46245/mock_sentinel_pickle.patch

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


More information about the Python-bugs-list mailing list