from unittest.mock import sentinel from multiprocessing import Queue #from queue import Queue #No issue with the normal queue q = Queue() s = sentinel.some_name print("The same", hex(id(s))) q.put(s) s2 = q.get() print("The same", hex(id(s))) print("The same", hex(id(sentinel.some_name))) print("This is different", hex(id(s2))) assert s == sentinel.some_name assert s == s2 #FAILS.