Let us walk on the 3-isogeny graph
|
Data Structures | |
class | _ReqExtras |
class | ContextualVersionConflict |
class | DefaultProvider |
class | DistInfoDistribution |
class | Distribution |
class | DistributionNotFound |
class | EggInfoDistribution |
class | EggMetadata |
class | EggProvider |
class | EmptyProvider |
class | EntryPoint |
class | Environment |
class | ExtractionError |
class | FileMetadata |
class | IMetadataProvider |
class | IResourceProvider |
class | MemoizedZipManifests |
class | NoDists |
class | NullProvider |
class | PathMetadata |
class | PEP440Warning |
class | PkgResourcesDeprecationWarning |
class | Requirement |
class | RequirementParseError |
class | ResolutionError |
class | ResourceManager |
class | UnknownExtra |
class | VersionConflict |
class | WorkingSet |
class | ZipManifests |
class | ZipProvider |
Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipulate resource names being passed into the API. The package resource API is designed to work with normal filesystem packages, .egg files, and unpacked .egg files. It can also work in a limited way with .zip files and with custom PEP 302 loaders that support the ``get_data()`` method. This module is deprecated. Users are directed to :mod:`importlib.resources`, :mod:`importlib.metadata` and :pypi:`packaging` instead.
__getstate__ | ( | ) |
Definition at line 147 of file __init__.py.
References i.
__setstate__ | ( | state | ) |
Definition at line 155 of file __init__.py.
References i.
|
protected |
Ensure object appears in the mro even for old-style classes.
Definition at line 3219 of file __init__.py.
|
protected |
Sandbox-bypassing version of ensure_directory()
Definition at line 3243 of file __init__.py.
|
protected |
Definition at line 3301 of file __init__.py.
|
protected |
Contrary to POSIX 2008, on Cygwin, getcwd (3) contains symlink components. Using os.path.abspath() works around this limitation. A fix in os.getcwd() would probably better, in Cygwin even more so, except that this seems to be by design...
Definition at line 2416 of file __init__.py.
|
protected |
Definition at line 142 of file __init__.py.
References i.
|
protected |
Return an adapter factory for `ob` from `registry`
Definition at line 3229 of file __init__.py.
Referenced by pip._vendor.pkg_resources.get_provider().
|
protected |
Fallback when ``safe_version`` is not safe enough >>> parse_version(_forgiving_version('0.23ubuntu1')) <Version('0.23.dev0+sanitized.ubuntu1')> >>> parse_version(_forgiving_version('0.23-')) <Version('0.23.dev0+sanitized')> >>> parse_version(_forgiving_version('0.-_')) <Version('0.dev0+sanitized')> >>> parse_version(_forgiving_version('42.+?1')) <Version('42.dev0+sanitized.1')> >>> parse_version(_forgiving_version('hello world')) <Version('0.dev0+sanitized.hello.world')>
Definition at line 1404 of file __init__.py.
|
protected |
Ensure that named package includes a subpath of path_item (if needed)
Definition at line 2258 of file __init__.py.
|
protected |
Definition at line 3307 of file __init__.py.
|
protected |
Prepare the master working set and make the ``require()`` API available. This function has explicit effects on the global state of pkg_resources. It is intended to be invoked once at the initialization of this module. Invocation by other packages is unsupported and done at their own risk.
Definition at line 3328 of file __init__.py.
|
protected |
Determine if given path appears to be an egg.
Definition at line 2435 of file __init__.py.
|
protected |
Determine if given path appears to be an unpacked egg.
Definition at line 2450 of file __init__.py.
|
protected |
Definition at line 2442 of file __init__.py.
|
protected |
Definition at line 426 of file __init__.py.
Referenced by pip._vendor.pkg_resources.get_build_platform().
|
protected |
Definition at line 410 of file __init__.py.
References i.
Referenced by pip._vendor.pkg_resources.get_build_platform(), and pip._vendor.pkg_resources.get_supported_platform().
|
protected |
Definition at line 3282 of file __init__.py.
|
protected |
Definition at line 2427 of file __init__.py.
|
protected |
yield all parents of path including path
Definition at line 1680 of file __init__.py.
|
protected |
Rebuild module.__path__ ensuring that all entries are ordered corresponding to their sys.path order
Definition at line 2295 of file __init__.py.
|
protected |
Convert an arbitrary string into a safe segment
Definition at line 1429 of file __init__.py.
|
protected |
Definition at line 2459 of file __init__.py.
|
protected |
Definition at line 162 of file __init__.py.
References i.
|
protected |
Definition at line 171 of file __init__.py.
References i.
|
protected |
Definition at line 166 of file __init__.py.
References i.
|
protected |
Definition at line 175 of file __init__.py.
References i.
|
protected |
Given an iterable of lines from a Metadata file, return the value of the Version field, if present, or None otherwise.
Definition at line 2614 of file __init__.py.
compatible_platforms | ( | provided, | |
required | |||
) |
Can code for the `provided` platform run on the `required` platform? Returns true if either platform is ``None``, or the platforms are equal. XXX Needs compatibility checks for Linux and other unixy OSes.
Definition at line 461 of file __init__.py.
References i.
declare_namespace | ( | packageName | ) |
Declare that package 'packageName' is a namespace package
Definition at line 2329 of file __init__.py.
dist_factory | ( | path_item, | |
entry, | |||
only | |||
) |
Return a dist_factory for the given entry.
Definition at line 2138 of file __init__.py.
distributions_from_metadata | ( | path | ) |
Definition at line 2189 of file __init__.py.
ensure_directory | ( | path | ) |
Ensure that the parent directory of `path` exists
Definition at line 3237 of file __init__.py.
evaluate_marker | ( | text, | |
extra = None |
|||
) |
Evaluate a PEP 508 environment marker. Return a boolean indicating the marker result in this environment. Raise SyntaxError if marker is invalid. This implementation uses the 'pyparsing' module.
Definition at line 1467 of file __init__.py.
file_ns_handler | ( | importer, | |
path_item, | |||
packageName, | |||
module | |||
) |
Compute an ns-package subpath for a filesystem or zipfile importer
Definition at line 2384 of file __init__.py.
find_distributions | ( | path_item, | |
only = False |
|||
) |
Yield distributions accessible via `path_item`
Definition at line 2073 of file __init__.py.
find_eggs_in_zip | ( | importer, | |
path_item, | |||
only = False |
|||
) |
Find eggs in zip files; possibly multiple nested eggs.
Definition at line 2080 of file __init__.py.
find_nothing | ( | importer, | |
path_item, | |||
only = False |
|||
) |
Definition at line 2110 of file __init__.py.
find_on_path | ( | importer, | |
path_item, | |||
only = False |
|||
) |
Yield distributions accessible on a sys.path directory
Definition at line 2117 of file __init__.py.
fixup_namespace_packages | ( | path_item, | |
parent = None |
|||
) |
Ensure that previously-declared namespace packages include path_item
Definition at line 2372 of file __init__.py.
get_build_platform | ( | ) |
Return this platform's string for platform-specific distributions XXX Currently this is the same as ``distutils.util.get_platform()``, but it needs some hacks for Linux and macOS.
Definition at line 430 of file __init__.py.
References pip._vendor.pkg_resources._macos_arch(), pip._vendor.pkg_resources._macos_vers(), pip._vendor.pkg_resources.get_platform, and i.
Referenced by pip._vendor.pkg_resources.get_supported_platform().
get_default_cache | ( | ) |
Return the ``PYTHON_EGG_CACHE`` environment variable or a platform-relevant user cache dir for an app named "Python-Eggs".
Definition at line 1373 of file __init__.py.
get_distribution | ( | dist | ) |
Return a current distribution object for a Requirement or string
Definition at line 523 of file __init__.py.
References pip._vendor.pkg_resources.get_provider(), and i.
get_entry_info | ( | dist, | |
group, | |||
name | |||
) |
Return the EntryPoint object for `group`+`name`, or ``None``
Definition at line 544 of file __init__.py.
get_entry_map | ( | dist, | |
group = None |
|||
) |
Return the entry point map for `group`, or the full entry map
Definition at line 539 of file __init__.py.
get_provider | ( | moduleOrReq | ) |
Return an IResourceProvider for the named module or requirement
Definition at line 397 of file __init__.py.
References pip._vendor.pkg_resources._find_adapter(), i, and pip._vendor.pkg_resources.require.
Referenced by pip._vendor.pkg_resources.get_distribution().
get_supported_platform | ( | ) |
Return this platform's maximum compatible version. distutils.util.get_platform() normally reports the minimum version of macOS that would be required to *use* extensions produced by distutils. But what we want when checking compatibility is to know the version of macOS that we are *running*. To allow usage of packages that explicitly require a newer version of macOS, we must also know the current version of the OS. If this condition occurs for any other platform with a version in its platform strings, this function should be extended accordingly.
Definition at line 182 of file __init__.py.
References pip._vendor.pkg_resources._macos_vers(), pip._vendor.pkg_resources.get_build_platform(), and i.
invalid_marker | ( | text | ) |
Validate text as a PEP 508 environment marker; return an exception if invalid or False otherwise.
Definition at line 1453 of file __init__.py.
issue_warning | ( | * | args, |
** | kw | ||
) |
Definition at line 3145 of file __init__.py.
load_entry_point | ( | dist, | |
group, | |||
name | |||
) |
Return `name` entry point of `group` for `dist` or raise ImportError
Definition at line 534 of file __init__.py.
non_empty_lines | ( | path | ) |
Yield non-empty lines from file at path
Definition at line 2207 of file __init__.py.
normalize_path | ( | filename | ) |
Normalize a file/dir name for comparison purposes
Definition at line 2411 of file __init__.py.
null_ns_handler | ( | importer, | |
path_item, | |||
packageName, | |||
module | |||
) |
Definition at line 2404 of file __init__.py.
parse_requirements | ( | strs | ) |
Yield ``Requirement`` objects for each specification in `strs`. `strs` must be a string, or a (possibly-nested) iterable thereof.
Definition at line 3158 of file __init__.py.
register_finder | ( | importer_type, | |
distribution_finder | |||
) |
Register `distribution_finder` to find distributions in sys.path items `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item handler), and `distribution_finder` is a callable that, passed a path item and the importer instance, yields ``Distribution`` instances found on that path item. See ``pkg_resources.find_on_path`` for an example.
Definition at line 2063 of file __init__.py.
register_loader_type | ( | loader_type, | |
provider_factory | |||
) |
Register `provider_factory` to make providers for `loader_type` `loader_type` is the type or class of a PEP 302 ``module.__loader__``, and `provider_factory` is a function that, passed a *module* object, returns an ``IResourceProvider`` for that module.
Definition at line 387 of file __init__.py.
register_namespace_handler | ( | importer_type, | |
namespace_handler | |||
) |
Register `namespace_handler` to declare namespace packages `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item handler), and `namespace_handler` is a callable like this:: def namespace_handler(importer, path_entry, moduleName, module): # return a path_entry to use for child packages Namespace handlers are only called if the importer object has already agreed that it can handle the relevant path item, and they should only return a subpath if the module __path__ does not already contain an equivalent subpath. For an example namespace handler, see ``pkg_resources.file_ns_handler``.
Definition at line 2240 of file __init__.py.
resolve_egg_link | ( | path | ) |
Given a path to an .egg-link, resolve distributions present in the referenced path.
Definition at line 2218 of file __init__.py.
run_script | ( | dist_spec, | |
script_name | |||
) |
Locate distribution `dist_spec` and run its `script_name` script
Definition at line 510 of file __init__.py.
References i, pip._vendor.pkg_resources.require, and pip._vendor.pkg_resources.run_script().
Referenced by pip._vendor.pkg_resources.run_script().
safe_extra | ( | extra | ) |
Convert an arbitrary string to a standard 'extra' name Any runs of non-alphanumeric characters are replaced with a single '_', and the result is always lowercased.
Definition at line 1436 of file __init__.py.
safe_listdir | ( | path | ) |
Attempt to list contents of path, but suppress some exceptions.
Definition at line 2173 of file __init__.py.
safe_name | ( | name | ) |
Convert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'.
Definition at line 1384 of file __init__.py.
safe_version | ( | version | ) |
Convert an arbitrary string to a standard version string
Definition at line 1392 of file __init__.py.
split_sections | ( | s | ) |
Split a string or iterable thereof into (section, content) pairs Each ``section`` is a stripped version of the section header ("[section]") and each ``content`` is a list of stripped lines excluding blank lines and comment-only lines. If there are any such lines before the first section header, they're returned in a first ``section`` of ``None``.
Definition at line 3256 of file __init__.py.
to_filename | ( | name | ) |
Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'.
Definition at line 1445 of file __init__.py.
|
protected |
Definition at line 113 of file __init__.py.
|
protected |
Definition at line 3138 of file __init__.py.
|
protected |
Definition at line 114 of file __init__.py.
|
protected |
Definition at line 115 of file __init__.py.
Definition at line 126 of file __init__.py.
|
protected |
Definition at line 377 of file __init__.py.
Definition at line 179 of file __init__.py.
|
protected |
Definition at line 139 of file __init__.py.
add_activation_listener = None |
Definition at line 101 of file __init__.py.
append |
Definition at line 3297 of file __init__.py.
AvailableDistributions = Environment |
Definition at line 1176 of file __init__.py.
int BINARY_DIST = 2 |
Definition at line 381 of file __init__.py.
category |
Definition at line 3297 of file __init__.py.
int CHECKOUT_DIST = 0 |
Definition at line 383 of file __init__.py.
cleanup_resources = None |
Definition at line 103 of file __init__.py.
darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") |
Definition at line 456 of file __init__.py.
int DEVELOP_DIST = -1 |
Definition at line 384 of file __init__.py.
int EGG_DIST = 3 |
Definition at line 380 of file __init__.py.
EGG_NAME |
Definition at line 2468 of file __init__.py.
empty_provider = EmptyProvider() |
Definition at line 1761 of file __init__.py.
FileExistsError = OSError |
Definition at line 55 of file __init__.py.
get_platform = get_build_platform |
Definition at line 458 of file __init__.py.
Referenced by pip._vendor.pkg_resources.get_build_platform().
importlib_machinery = None |
Definition at line 77 of file __init__.py.
iter_entry_points = None |
Definition at line 109 of file __init__.py.
macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") |
Definition at line 455 of file __init__.py.
MODULE = re.compile(r"\w+(\.\w+)*$").match |
Definition at line 2467 of file __init__.py.
parse_version = packaging.version.Version |
Definition at line 136 of file __init__.py.
Definition at line 3297 of file __init__.py.
str PY_MAJOR = '{}.{}'.format(*sys.version_info) |
Definition at line 379 of file __init__.py.
require = None |
Definition at line 99 of file __init__.py.
Referenced by pip._vendor.pkg_resources.get_provider(), and pip._vendor.pkg_resources.run_script().
resource_dir = None |
Definition at line 104 of file __init__.py.
resource_exists = None |
Definition at line 112 of file __init__.py.
resource_filename = None |
Definition at line 111 of file __init__.py.
resource_isdir = None |
Definition at line 107 of file __init__.py.
resource_listdir = None |
Definition at line 110 of file __init__.py.
resource_stream = None |
Definition at line 105 of file __init__.py.
resource_string = None |
Definition at line 108 of file __init__.py.
resources_stream = None |
Definition at line 102 of file __init__.py.
run_main = run_script |
Definition at line 520 of file __init__.py.
set_extraction_path = None |
Definition at line 106 of file __init__.py.
int SOURCE_DIST = 1 |
Definition at line 382 of file __init__.py.
stacklevel |
Definition at line 122 of file __init__.py.
working_set = None |
Definition at line 100 of file __init__.py.
bool WRITE_SUPPORT = True |
Definition at line 63 of file __init__.py.