Skip to content

Commit 84fd013

Browse files
committed
Remove 'get_payload' from the PackageMetadata protocol now that Description is available.
1 parent e675da1 commit 84fd013

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

importlib_metadata/_meta.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ def __getitem__(self, key: str) -> str:
1818
def __iter__(self) -> Iterator[str]:
1919
... # pragma: no cover
2020

21-
def get_payload(self) -> str:
22-
... # pragma: no cover
23-
2421
def get_all(self, name: str, failobj: _T = ...) -> Union[List[Any], _T]:
2522
"""
2623
Return all values associated with a possibly multi-valued key.

tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_metadata_loads(self):
162162
def test_metadata_loads_egg_info(self):
163163
pkg_name = self.pkg_with_non_ascii_description_egg_info(self.site_dir)
164164
meta = metadata(pkg_name)
165-
assert meta.get_payload() == 'pôrˈtend\n'
165+
assert meta['Description'] == 'pôrˈtend\n'
166166

167167

168168
class DiscoveryTests(fixtures.EggInfoPkg, fixtures.DistInfoPkg, unittest.TestCase):

0 commit comments

Comments
 (0)