This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Vlastimil.Zíma
Recipients Vlastimil.Zíma
Date 2014-02-28.09:22:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sentinels lose their identity when they are pickled, meaning they are no longer equal to sentinel with the same name.

>>> from mock import sentinel
>>> import pickle
>>> ==
>>> pickle.loads(pickle.dumps( ==

I found this bug using Python 2.7.3 and python-mock 1.0.1. Since mock 1.0 is part of Python 3.3 and 3.4 it affects these versions (tested in 3.3.3).

This behavior is tricky to find out if encountered in tests and sentinels can not be used in tests of code which uses pickle and possibly other serializations.
Date User Action Args
2014-02-28 09:22:37Vlastimil.Zímasetrecipients: + Vlastimil.Zíma
2014-02-28 09:22:37Vlastimil.Zímasetmessageid: <>
2014-02-28 09:22:37Vlastimil.Zímalinkissue20804 messages
2014-02-28 09:22:36Vlastimil.Zímacreate