diff options
| -rw-r--r-- | CHANGES.rst | 6 | ||||
| -rw-r--r-- | pkg_resources/__init__.py | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 1b515f55..e518b199 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +v38.5.2 +------- + +* #1285: Fixed RuntimeError in pkg_resources.parse_requirements + on Python 3.7 (stemming from PEP 479). + v38.5.1 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 062b82c6..c9b2d251 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3035,7 +3035,10 @@ def parse_requirements(strs): # If there is a line continuation, drop it, and append the next line. if line.endswith('\\'): line = line[:-2].strip() - line += next(lines) + try: + line += next(lines) + except StopIteration: + return yield Requirement(line) |
