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 ned.deily
Recipients msmhrt, ned.deily
Date 2014-07-06.05:30:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404624647.27.0.692928217696.issue21925@psf.upfronthosting.co.za>
In-reply-to
Content
I believe this is an artifact of hash randomization which affects the order of how objects are destroyed during shutdown.  If you run your test using different values of the PYTHONHASHSEED environment variable, you'll probably see predictable results.  For example, with a particular build of Python 3.4.1, if I set PYTHONHASHSEED set to 0, thereby disabling hash randomization, I never see the warning:

PYTHONHASHSEED=0 python3.4 -W all test_warning.py

With it set to 1, I always see the warning.  With 2, no warning. With no PYTHONHASHSEED, I see random behavior similar to your results.

I don't think there is anything to be done here as Python makes no promises about when and in what order objects are collected.

https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED
History
Date User Action Args
2014-07-06 05:30:47ned.deilysetrecipients: + ned.deily, msmhrt
2014-07-06 05:30:47ned.deilysetmessageid: <1404624647.27.0.692928217696.issue21925@psf.upfronthosting.co.za>
2014-07-06 05:30:47ned.deilylinkissue21925 messages
2014-07-06 05:30:46ned.deilycreate