Let us walk on the 3-isogeny graph
|
Namespaces | |
namespace | _json |
namespace | base |
namespace | importlib |
namespace | pkg_resources |
Data Structures | |
class | Backend |
Functions | |
bool | _should_use_importlib_metadata () |
Backend | select_backend () |
BaseEnvironment | get_default_environment () |
BaseEnvironment | get_environment (Optional[List[str]] paths) |
BaseDistribution | get_directory_distribution (str directory) |
BaseDistribution | get_wheel_distribution (Wheel wheel, str canonical_name) |
BaseDistribution | get_metadata_distribution (bytes metadata_contents, str filename, str canonical_name) |
Variables | |
Protocol = object | |
|
protected |
Whether to use the ``importlib.metadata`` or ``pkg_resources`` backend. By default, pip uses ``importlib.metadata`` on Python 3.11+, and ``pkg_resourcess`` otherwise. This can be overridden by a couple of ways: * If environment variable ``_PIP_USE_IMPORTLIB_METADATA`` is set, it dictates whether ``importlib.metadata`` is used, regardless of Python version. * On Python 3.11+, Python distributors can patch ``importlib.metadata`` to add a global constant ``_PIP_USE_IMPORTLIB_METADATA = False``. This makes pip use ``pkg_resources`` (unless the user set the aforementioned environment variable to *True*).
Definition at line 29 of file __init__.py.
References i.
Referenced by pip._internal.metadata.select_backend().
BaseEnvironment get_default_environment | ( | ) |
Get the default representation for the current environment. This returns an Environment instance from the chosen backend. The default Environment instance should be built from ``sys.path`` and may use caching to share instance state accorss calls.
Definition at line 68 of file __init__.py.
References i, and pip._internal.metadata.select_backend().
BaseDistribution get_directory_distribution | ( | str | directory | ) |
Get the distribution metadata representation in the specified directory. This returns a Distribution instance from the chosen backend based on the given on-disk ``.dist-info`` directory.
Definition at line 88 of file __init__.py.
References i, and pip._internal.metadata.select_backend().
BaseEnvironment get_environment | ( | Optional[List[str]] | paths | ) |
Get a representation of the environment specified by ``paths``. This returns an Environment instance from the chosen backend based on the given import paths. The backend must build a fresh instance representing the state of installed distributions when this function is called.
Definition at line 78 of file __init__.py.
References i, and pip._internal.metadata.select_backend().
BaseDistribution get_metadata_distribution | ( | bytes | metadata_contents, |
str | filename, | ||
str | canonical_name | ||
) |
Get the dist representation of the specified METADATA file contents. This returns a Distribution instance from the chosen backend sourced from the data in `metadata_contents`. :param metadata_contents: Contents of a METADATA file within a dist, or one served via PEP 658. :param filename: Filename for the dist this metadata represents. :param canonical_name: Normalized project name of the given dist.
Definition at line 108 of file __init__.py.
References i, and pip._internal.metadata.select_backend().
BaseDistribution get_wheel_distribution | ( | Wheel | wheel, |
str | canonical_name | ||
) |
Get the representation of the specified wheel's distribution metadata. This returns a Distribution instance from the chosen backend based on the given wheel's ``.dist-info`` directory. :param canonical_name: Normalized project name of the given wheel.
Definition at line 97 of file __init__.py.
References i, and pip._internal.metadata.select_backend().
Backend select_backend | ( | ) |
Definition at line 58 of file __init__.py.
References pip._internal.metadata._should_use_importlib_metadata().
Referenced by pip._internal.metadata.get_default_environment(), pip._internal.metadata.get_directory_distribution(), pip._internal.metadata.get_environment(), pip._internal.metadata.get_metadata_distribution(), and pip._internal.metadata.get_wheel_distribution().
Protocol = object |
Definition at line 14 of file __init__.py.