diff options
-rw-r--r-- | pkg_resources/__init__.py | 2 | ||||
-rw-r--r-- | tests/test_pkg_resources.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index a0b354ff..ac3807d8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2280,7 +2280,7 @@ class EntryPoint(object): pattern = re.compile( r'\s*' - r'(?P<name>[\w. -]+?)\s*' + r'(?P<name>[+\w. -]+?)\s*' r'=\s*' r'(?P<module>[\w.]+)\s*' r'(:\s*(?P<attr>[\w.]+))?\s*' diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py index 564d7cec..4dfd14b3 100644 --- a/tests/test_pkg_resources.py +++ b/tests/test_pkg_resources.py @@ -109,3 +109,11 @@ class TestIndependence: ) cmd = [sys.executable, '-c', '; '.join(lines)] subprocess.check_call(cmd) + + +class TestEntryPoint: + """Tests that ensure EntryPoint behaviour doesn't regress.""" + def test_accepts_old_entry_points(self): + """https://bitbucket.org/pypa/setuptools/issue/323/install-issues-with-102""" + entry_point_string = 'html+mako = mako.ext.pygmentplugin:MakoHtmlLexer' + pkg_resources.EntryPoint.parse(entry_point_string) |