Message282485
The issue is that the Meta class has a reference to the class Foo in its mro() method, but Foo is not aware of Meta. So when Foo is modified, the Foo cache is invalidated, but not Meta cache.
issue28866.diff always invalidates the cache, so it works. But it is suboptimal, IMO it defeats the whole purpose of a cache.
I never defined a mro() method. I'm not sure that it's possible to have a type cache and a mro() method?
Options:
* Disable completely the cache on classes defining mro()
* Modify "Meta" (the C code implementing the type, not the Python code) to track the version tag of each class referenced by mro(). Problem: mro() is dynamic!?
* Somehow, notify Foo that Meta has a reference to its cache, so Foo is able to invalidate Meta cache |
|
Date |
User |
Action |
Args |
2016-12-05 23:13:53 | vstinner | set | recipients:
+ vstinner, serhiy.storchaka, abarry, mdk, sjpalt |
2016-12-05 23:13:53 | vstinner | set | messageid: <1480979633.12.0.0579736002609.issue28866@psf.upfronthosting.co.za> |
2016-12-05 23:13:53 | vstinner | link | issue28866 messages |
2016-12-05 23:13:52 | vstinner | create | |
|