xoutil.eight.abc - Abstract Base Classes (ABCs) according to PEP 3119

Abstract Base Classes (ABCs) according to PEP 3119.

Compatibility module between Python 2 and 3.

This module defines one symbol that is defined in Python 3 as a class:

class ABC(metaclass=ABCMeta):
“”“Helper class that provides a standard way to create an ABC using inheritance. “”” pass

In our case it’s defined as ABC = metaclass(ABCMeta), that is a little tricky (see xoutil.eight.meta.metaclass:func`).

abstractclassmethod is deprecated. Use classmethod with abstractmethod instead.

abstractstaticmethod is deprecated. Use staticmethod with abstractmethod instead.

xoutil.eight.abc.get_cache_token()[source]

Returns the current ABC cache token.

The token is an opaque object (supporting equality testing) identifying the current version of the ABC cache for virtual sub-classes. The token changes with every call to register() on any ABC.