mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
Apply changes from importlib_metadata refresh.
This commit is contained in:
parent
1b52d5b729
commit
de0f89dcaf
2 changed files with 591 additions and 588 deletions
|
@ -1363,8 +1363,11 @@ class PathFinder:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def find_distributions(cls, name=None, path=None):
|
def find_distributions(cls, name=None, path=None):
|
||||||
"""Return an iterable of all Distribution instances capable of
|
"""
|
||||||
loading the metadata for packages matching the name
|
Find distributions.
|
||||||
|
|
||||||
|
Return an iterable of all Distribution instances capable of
|
||||||
|
loading the metadata for packages matching the ``name``
|
||||||
(or all names if not supplied) along the paths in the list
|
(or all names if not supplied) along the paths in the list
|
||||||
of directories ``path`` (defaults to sys.path).
|
of directories ``path`` (defaults to sys.path).
|
||||||
"""
|
"""
|
||||||
|
@ -1378,9 +1381,7 @@ class PathFinder:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _search_paths(cls, pattern, paths):
|
def _search_paths(cls, pattern, paths):
|
||||||
"""
|
"""Find metadata directories in paths heuristically."""
|
||||||
Find metadata directories in paths heuristically.
|
|
||||||
"""
|
|
||||||
import itertools
|
import itertools
|
||||||
return itertools.chain.from_iterable(
|
return itertools.chain.from_iterable(
|
||||||
cls._search_path(path, pattern)
|
cls._search_path(path, pattern)
|
||||||
|
|
1168
Python/importlib_external.h
generated
1168
Python/importlib_external.h
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue