Author psimons
Recipients Erik.Tollerud, amaury.forgeotdarc, eric.araujo, eric.snow, meador.inge, psimons, python-dev
Date 2017-08-07.07:57:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502092672.84.0.537529689406.issue13487@psf.upfronthosting.co.za>
In-reply-to
Content
list(sys.modules.items()) still raises RuntimeError: dictionary changed size during iteration when another thread imports a module.

I would assume dict.copy() is thread-safe so a working fix could use sys.modules.copy().items()

I hit this bug when printing the name of the caller function using
inspect.stack(). The workaround in this case is calling inspect.stack(context=0).
History
Date User Action Args
2017-08-07 07:57:52psimonssetrecipients: + psimons, amaury.forgeotdarc, eric.araujo, meador.inge, python-dev, eric.snow, Erik.Tollerud
2017-08-07 07:57:52psimonssetmessageid: <1502092672.84.0.537529689406.issue13487@psf.upfronthosting.co.za>
2017-08-07 07:57:52psimonslinkissue13487 messages
2017-08-07 07:57:52psimonscreate