Skip to content

Commit e9e2750

Browse files
authored
Merge pull request #3106 from pypa/bugfix/3103-entry-points-from-string
Restore entry points from string
2 parents f83da68 + 7844b38 commit e9e2750

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

changelog.d/3103.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed issue where string-based entry points would be omitted.

setuptools/_entry_points.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,16 @@ def load(eps):
5353

5454
@load.register(str)
5555
def _(eps):
56-
return validate(metadata.EntryPoints._from_text(eps))
56+
r"""
57+
>>> ep, = load('[console_scripts]\nfoo=bar')
58+
>>> ep.group
59+
'console_scripts'
60+
>>> ep.name
61+
'foo'
62+
>>> ep.value
63+
'bar'
64+
"""
65+
return validate(metadata.EntryPoints(metadata.EntryPoints._from_text(eps)))
5766

5867

5968
load.register(type(None), lambda x: x)

0 commit comments

Comments
 (0)