Message299829
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). |
|
Date |
User |
Action |
Args |
2017-08-07 07:57:52 | psimons | set | recipients:
+ psimons, amaury.forgeotdarc, eric.araujo, meador.inge, python-dev, eric.snow, Erik.Tollerud |
2017-08-07 07:57:52 | psimons | set | messageid: <1502092672.84.0.537529689406.issue13487@psf.upfronthosting.co.za> |
2017-08-07 07:57:52 | psimons | link | issue13487 messages |
2017-08-07 07:57:52 | psimons | create | |
|