FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-46474: sync with importlib_metadata 4.10.0 by jaraco · Pull Request #30802 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
12 changes: 0 additions & 12 deletions Lib/importlib/metadata/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -571,18 +571,6 @@ def _discover_resolvers():
)
return filter(None, declared)

@classmethod
def _local(cls, root='.'):
from pep517 import build, meta

system = build.compat_system(root)
builder = functools.partial(
meta.build,
source_dir=root,
system=system,
)
return PathDistribution(zipfile.Path(meta.build_as_zip(builder)))

@property
def metadata(self) -> _meta.PackageMetadata:
"""Return the parsed metadata for this Distribution.
Expand Down
17 changes: 1 addition & 16 deletions Lib/test/test_importlib/fixtures.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import Dict, Union

try:
from importlib import resources
from importlib import resources # type: ignore

getattr(resources, 'files')
getattr(resources, 'as_file')
Expand Down Expand Up @@ -232,21 +232,6 @@ def setUp(self):
build_files(EggInfoFile.files, prefix=self.site_dir)


class LocalPackage:
files: FilesDef = {
"setup.py": """
import setuptools
setuptools.setup(name="local-pkg", version="2.0.1")
""",
}

def setUp(self):
self.fixtures = contextlib.ExitStack()
self.addCleanup(self.fixtures.close)
self.fixtures.enter_context(tempdir_as_cwd())
build_files(self.files)


def build_files(file_defs, prefix=pathlib.Path()):
"""Build a set of files/directories, as described by the

Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Removed private method from ``importlib.metadata.Path``. Sync with
importlib_metadata 4.10.0.

Back | FazBrowse Home | New Git URL