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 vstinner
Date 2019-04-08.17:14:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554743694.73.0.971622244391.issue36560@roundup.psfhosted.org>
In-reply-to
Content
The issue comes maybe from the complex code in Lib/test/libregrtest/refleak.py to handle the ABC cache:

    abcs = {}
    for abc in [getattr(collections.abc, a) for a in collections.abc.__all__]:
        if not isabstract(abc):
            continue
        for obj in abc.__subclasses__() + [abc]:
            abcs[obj] = _get_dump(obj)[0]

...

    # clear type cache
    sys._clear_type_cache()

    # Clear ABC registries, restoring previously saved ABC registries.
    abs_classes = [getattr(collections.abc, a) for a in collections.abc.__all__]
    abs_classes = filter(isabstract, abs_classes)
    for abc in abs_classes:
        for obj in abc.__subclasses__() + [abc]:
            for ref in abcs.get(obj, set()):
                if ref() is not None:
                    obj.register(ref())
            obj._abc_caches_clear()

    clear_caches()
History
Date User Action Args
2019-04-08 17:14:54vstinnersetrecipients: + vstinner
2019-04-08 17:14:54vstinnersetmessageid: <1554743694.73.0.971622244391.issue36560@roundup.psfhosted.org>
2019-04-08 17:14:54vstinnerlinkissue36560 messages
2019-04-08 17:14:54vstinnercreate