(info_or_cname)
Deregister a previously registered index. For testing only (production
    code never deregisters indices).

    :param info_or_cname: index info object or canonical name used for
                          an existing registry entry
    :raises: ESRegistryError
Deregister a previously registered index. For testing only (production
    code never deregisters indices).
Deregister a previously registered index . For testing only ( production code never deregisters indices ) .
def deregister(info_or_cname):
    """Deregister a previously registered index. For testing only (production
    code never deregisters indices).

    :param info_or_cname: index info object or canonical name used for
                          an existing registry entry
    :raises: ESRegistryError
    """
    cname = getattr(info_or_cname, "alias", info_or_cname)
    try:
        info = _ES_INFO_REGISTRY.pop(cname)
    except KeyError:
        raise ESRegistryError(f"name {cname!r} is not registered")
    _ALIAS_REF_COUNTS[info.alias] -= 1
    if _ALIAS_REF_COUNTS[info.alias] < 1:
        del _ALIAS_REF_COUNTS[info.alias]
def deregister ( info_or_cname ) : cname = getattr ( info_or_cname , "alias" , info_or_cname ) try : info = _ES_INFO_REGISTRY . pop ( cname ) except KeyError : raise ESRegistryError ( f"name {cname!r} is not registered" ) _ALIAS_REF_COUNTS [ info . alias ] -= 1 if _ALIAS_REF_COUNTS [ info . alias ] < 1 : del _ALIAS_REF_COUNTS [ info . alias ]