'Perform compatibility check when loading libclang
The python bindings are only tested and evaluated with the version of
libclang they are provided with. To ensure correct behavior a (limited)
compatibility check is performed when loading the bindings. This check
will throw an exception, as soon as it fails.
In case these bindings are used with an older version of libclang, parts
that have been stable between releases may still work. Users of the
python bindings can disable the compatibility check. This will cause
the python bindings to load, even though they are written for a newer
version of libclang. Failures now arise if unsupported or incompatible
features are accessed. The user is required to test himself if the
features he is using are available and compatible between different
libclang versions.'

@staticmethod
def set_compatibility_check(check_status):

    if Config.loaded:
        raise Exception('compatibility_check    must    be    set    before    before    using    any    other    functionalities    in    libclang.')
    Config.compatibility_check = check_status
