I discovered this while creating the Coupler Qid without caching.
This example shows that the test for this is broken, as, when unpickling, the act of unpickling actually corrupts the cache. Both the unpickled Qid and original Qid have the same hash, but it is the BAD HASH!!!!
This can be demonstrated by comparing the hash to the previous hash saved before pickling.
I am not quite sure how to fix it. Maybe use __getstate__ and __setstate__ instead
This example shows that the test for this is broken, as, when unpickling, the act of unpickling actually corrupts the cache. Both the unpickled Qid and original Qid have the same hash, but it is the BAD HASH!!!!
This can be demonstrated by comparing the hash to the previous hash saved before pickling.
I am not quite sure how to fix it. Maybe use
__getstate__
and__setstate__
instead