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 pitrou
Recipients alexandre.vassalotti, amaury.forgeotdarc, barry, belopolsky, benjamin.peterson, mark.dickinson, nnorwitz, pitrou, terry.reedy, tim.peters
Date 2010-07-16.16:24:02
SpamBayes Score 2.2157667e-05
Marked as misclassified No
Message-id <1279297435.3242.3.camel@localhost.localdomain>
In-reply-to <1279296535.24.0.359760892777.issue3657@psf.upfronthosting.co.za>
Content
> 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.
History
Date User Action Args
2010-07-16 16:24:05pitrousetrecipients: + pitrou, tim.peters, barry, nnorwitz, terry.reedy, amaury.forgeotdarc, mark.dickinson, belopolsky, alexandre.vassalotti, benjamin.peterson
2010-07-16 16:24:03pitroulinkissue3657 messages
2010-07-16 16:24:02pitroucreate