$27 GRAYBYTE WORDPRESS FILE MANAGER $76

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.174
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/hc_python/lib/python3.12/site-packages/importlib_metadata/

HOME
Current File : /opt/hc_python/lib/python3.12/site-packages/importlib_metadata//_compat.py
import platform
import sys

__all__ = ['install', 'NullFinder']


def install(cls):
    """
    Class decorator for installation on sys.meta_path.

    Adds the backport DistributionFinder to sys.meta_path and
    attempts to disable the finder functionality of the stdlib
    DistributionFinder.
    """
    sys.meta_path.append(cls())
    disable_stdlib_finder()
    return cls


def disable_stdlib_finder():
    """
    Give the backport primacy for discovering path-based distributions
    by monkey-patching the stdlib O_O.

    See #91 for more background for rationale on this sketchy
    behavior.
    """

    def matches(finder):
        return getattr(
            finder, '__module__', None
        ) == '_frozen_importlib_external' and hasattr(finder, 'find_distributions')

    for finder in filter(matches, sys.meta_path):  # pragma: nocover
        del finder.find_distributions


class NullFinder:
    """
    A "Finder" (aka "MetaPathFinder") that never finds any modules,
    but may find distributions.
    """

    @staticmethod
    def find_spec(*args, **kwargs):
        return None


def pypy_partial(val):
    """
    Adjust for variable stacklevel on partial under PyPy.

    Workaround for #327.
    """
    is_pypy = platform.python_implementation() == 'PyPy'
    return val + is_pypy


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Dec 2025 9.30 AM
root / root
0755
__pycache__
--
23 May 2025 8.33 AM
root / root
0755
compat
--
23 May 2025 8.33 AM
root / root
0755
__init__.py
36.193 KB
23 May 2025 8.33 AM
root / root
0644
_adapters.py
3.695 KB
23 May 2025 8.33 AM
root / root
0644
_collections.py
0.742 KB
23 May 2025 8.33 AM
root / root
0644
_compat.py
1.282 KB
23 May 2025 8.33 AM
root / root
0644
_functools.py
2.827 KB
23 May 2025 8.33 AM
root / root
0644
_itertools.py
5.226 KB
23 May 2025 8.33 AM
root / root
0644
_meta.py
1.724 KB
23 May 2025 8.33 AM
root / root
0644
_text.py
2.115 KB
23 May 2025 8.33 AM
root / root
0644
_typing.py
0.358 KB
23 May 2025 8.33 AM
root / root
0644
diagnose.py
0.37 KB
23 May 2025 8.33 AM
root / root
0644
py.typed
0 KB
23 May 2025 8.33 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF