Skip to content

Commit

Permalink
Prefer re.findall, which returns materialized results. Fixes #369.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 26, 2022
1 parent b4661fd commit 14cce75
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.2
=======

* #369: Fixed bug where ``EntryPoint.extras`` was returning
match objects and not the extras strings.

v4.11.1
=======

Expand Down
2 changes: 1 addition & 1 deletion importlib_metadata/__init__.py
Expand Up @@ -217,7 +217,7 @@ def attr(self):
@property
def extras(self):
match = self.pattern.match(self.value)
return list(re.finditer(r'\w+', match.group('extras') or ''))
return re.findall(r'\w+', match.group('extras') or '')

def _for(self, dist):
vars(self).update(dist=dist)
Expand Down

0 comments on commit 14cce75

Please sign in to comment.