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 vstinner
Recipients abarry, mdk, serhiy.storchaka, sjpalt, vstinner
Date 2016-12-05.23:13:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480979633.12.0.0579736002609.issue28866@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-12-05 23:13:53vstinnersetrecipients: + vstinner, serhiy.storchaka, abarry, mdk, sjpalt
2016-12-05 23:13:53vstinnersetmessageid: <1480979633.12.0.0579736002609.issue28866@psf.upfronthosting.co.za>
2016-12-05 23:13:53vstinnerlinkissue28866 messages
2016-12-05 23:13:52vstinnercreate