Skip to content

Commit

Permalink
In _read_egg_info_reqs, when requires.txt exists but is empty, return…
Browse files Browse the repository at this point in the history
… an empty list. Fixes #367.
  • Loading branch information
jaraco committed Feb 15, 2022
1 parent 96c79f6 commit 97e0293
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.rst
@@ -1,3 +1,9 @@
v4.11.1
=======

* #367: In ``Distribution.requires`` for egg-info, if ``requires.txt``
is empty, return an empty list.

v4.11.0
=======

Expand Down
2 changes: 1 addition & 1 deletion importlib_metadata/__init__.py
Expand Up @@ -659,7 +659,7 @@ def _read_dist_info_reqs(self):

def _read_egg_info_reqs(self):
source = self.read_text('requires.txt')
return source and self._deps_from_requires_text(source)
return pass_none(self._deps_from_requires_text)(source)

@classmethod
def _deps_from_requires_text(cls, source):
Expand Down

0 comments on commit 97e0293

Please sign in to comment.