Antoine Pitrou <pit...@free.fr> added the comment:

> Revision 68903 was merged in py3k in r68908.  It looks like a similar issue 
> shows up in test_random:
> 
> ======================================================================
> ERROR: test_pickling (test.test_random.MersenneTwister_TestBasicOps)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_random.py",
>  line 107, in test_pickling
>     state = pickle.dumps(self.gen)
>   File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/pickle.py", 
> line 1358, in dumps
>     Pickler(f, protocol, fix_imports=fix_imports).dump(obj)
> _pickle.PicklingError: Can't pickle <class 'random.Random'>: it's not the 
> same object as random.Random

Actually, this might have to do with the fix I committed to
test_threaded_import in r82885.
In order for test_threaded_import to work, we have to unload the "Guinea
pig" module before importing it from several threads at once. For
whatever reason, test_threaded_import uses random as its Guinea pig
module, which means random gets unloaded and reimported again.

But at this point, I must admit I don't even understand the failure
message.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to