[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Jason Curtis
Jason Curtis added the comment: sounds right; closing as a duplicate of issue20804 -- resolution: -> duplicate status: open -> closed ___ Python tracker ___

[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Davin Potts
Davin Potts added the comment: I think this should be regarded as a duplicate of issue20804 though discussion in issue14577 is also related/relevant. -- superseder: -> Sentinels identity lost when pickled (unittest.mock) ___ Python tracker

[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Davin Potts
Davin Potts added the comment: This arises from the behavior of pickle (which is used by default in multiprocessing to serialize objects sent to / received from other processes in data exchanges), as seen with Python 3.6: >>> import pickle >>> x = pickle.dumps(mock.sentinel.foo) >>> x b'\x80\x

[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Jason Curtis
New submission from Jason Curtis: When a sentinel object from unittest.mock.sentinel is passed through a multiprocessing.Pool.map, I expect it to still be comparable. As a user, I'd like to be able to write a unit test using sentinels on my unparallelized code, and then see that the test stil