Skip to content

Commit e6fa017

Browse files
committed
Make _local a private method, available provisionally.
1 parent 4d2f2c2 commit e6fa017

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

importlib_metadata/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def _discover_resolvers():
243243
return filter(None, declared)
244244

245245
@classmethod
246-
def find_local(cls, root='.'):
246+
def _local(cls, root='.'):
247247
from pep517 import build, meta
248248
system = build.compat_system(root)
249249
builder = functools.partial(

importlib_metadata/docs/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
v1.6.1
66
======
77

8+
* Added ``Distribution._local()`` as a provisional
9+
demonstration of how to load metadata for a local
10+
package. Implicitly requires that
11+
`pep517 <https://pypi.org/project/pep517>`_ is
12+
installed. Ref #42.
813
* Ensure inputs to FastPath are Unicode. Closes #121.
914
* Tests now rely on ``importlib.resources.files`` (and
1015
backport) instead of the older ``path`` function.

importlib_metadata/tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,6 @@ def test_distribution_at_str(self):
178178

179179
class LocalProjectTests(fixtures.LocalPackage, unittest.TestCase):
180180
def test_find_local(self):
181-
dist = Distribution.find_local()
181+
dist = Distribution._local()
182182
assert dist.metadata['Name'] == 'local-pkg'
183183
assert dist.version == '2.0.1'

0 commit comments

Comments
 (0)