Message289015
> 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? |
|
Date |
User |
Action |
Args |
2017-03-05 15:21:32 | levkivskyi | set | recipients:
+ levkivskyi, gvanrossum, serhiy.storchaka |
2017-03-05 15:21:32 | levkivskyi | set | messageid: <1488727292.22.0.821440717967.issue29638@psf.upfronthosting.co.za> |
2017-03-05 15:21:32 | levkivskyi | link | issue29638 messages |
2017-03-05 15:21:31 | levkivskyi | create | |
|