Debug helper to print the ABC registry.
(cls, file=None)
| 123 | return _abc_subclasscheck(cls, subclass) |
| 124 | |
| 125 | def _dump_registry(cls, file=None): |
| 126 | """Debug helper to print the ABC registry.""" |
| 127 | print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file) |
| 128 | print(f"Inv. counter: {get_cache_token()}", file=file) |
| 129 | (_abc_registry, _abc_cache, _abc_negative_cache, |
| 130 | _abc_negative_cache_version) = _get_dump(cls) |
| 131 | print(f"_abc_registry: {_abc_registry!r}", file=file) |
| 132 | print(f"_abc_cache: {_abc_cache!r}", file=file) |
| 133 | print(f"_abc_negative_cache: {_abc_negative_cache!r}", file=file) |
| 134 | print(f"_abc_negative_cache_version: {_abc_negative_cache_version!r}", |
| 135 | file=file) |
| 136 | |
| 137 | def _abc_registry_clear(cls): |
| 138 | """Clear the registry (for debugging or testing).""" |
nothing calls this directly
no test coverage detected