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 levkivskyi
Recipients gvanrossum, levkivskyi, serhiy.storchaka
Date 2017-03-05.15:21:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488727292.22.0.821440717967.issue29638@psf.upfronthosting.co.za>
In-reply-to
Content
> why not add corresponding clearing methods obj._abc_cache.clear and obj._abc_negative_cache.clear to typing._cleanups ?

OK, this is another possible solution. I didn't think about this, because now typing._cleanups only clear generic caches (not ABC caches).

> Why there are problems only with ABC caches of these three types?

Normally, ABC caches are cleared in dash_R_cleanup, but I think that the problem is that inspect.isabstract returns False for these three types (unlike other types in typing module), see line 147 in refleak.py:

        if not isabstract(abc):
            continue

Actually now I think that the code in dash_R_cleanup might not clear some other caches also. So maybe we just need to add all ABC caches to typing._cleanups (just in case). What do you think, Serhiy?
History
Date User Action Args
2017-03-05 15:21:32levkivskyisetrecipients: + levkivskyi, gvanrossum, serhiy.storchaka
2017-03-05 15:21:32levkivskyisetmessageid: <1488727292.22.0.821440717967.issue29638@psf.upfronthosting.co.za>
2017-03-05 15:21:32levkivskyilinkissue29638 messages
2017-03-05 15:21:31levkivskyicreate