<commit_before>from urljr import fetchers

from openid import oidutil

# If the Yadis library is available, use it. Otherwise, only use
# old-style discovery.
try:
    import yadis
except ImportError:
    yadis_available = False

    oidutil.log('Consumer operating without Yadis support '
                '(failed to import Yadis library)')

    class DisccoveryFailure(RuntimeError):
        """Stand-in in case we don't have Yadis"""
else:
    yadis_available = True
    from yadis.etxrd import nsTag, XRDSError
    from yadis.services import applyFilter as extractServices
    from yadis.discover import discover as yadisDiscover
    from yadis.discover import DiscoveryFailure<commit_msg>[project @ consumer.discover.DiscoveryFailure: slightly more useful docstring.]<commit_after>from urljr import fetchers

from openid import oidutil

# If the Yadis library is available, use it. Otherwise, only use
# old-style discovery.
try:
    import yadis
except ImportError:
    yadis_available = False

    oidutil.log('Consumer operating without Yadis support '
                '(failed to import Yadis library)')

    class DisccoveryFailure(RuntimeError):
        """A failure to discover an OpenID server.

        When the C{yadis} package is available, this is
        C{yadis.discover.DiscoveryFailure}."""
else:
    yadis_available = True
    from yadis.etxrd import nsTag, XRDSError
    from yadis.services import applyFilter as extractServices
    from yadis.discover import discover as yadisDiscover
    from yadis.discover import DiscoveryFailure
{'fraction_non_alphanumeric': 0.060411311053984576, 'fraction_numerical': 0.0, 'mean_word_length': 3.647761194029851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4198598', 'n_tokens_mistral': 462, 'n_tokens_neox': 444, 'n_words': 155}