Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
32ce4744
Commit
32ce4744
authored
Jan 06, 2015
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore support for printable characters in the entry point name. Fixes #327.
parent
6fe9a614
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
CHANGES.txt
CHANGES.txt
+7
-0
pkg_resources/__init__.py
pkg_resources/__init__.py
+1
-1
pkg_resources/tests/test_resources.py
pkg_resources/tests/test_resources.py
+11
-0
No files found.
CHANGES.txt
View file @
32ce4744
...
@@ -2,6 +2,13 @@
...
@@ -2,6 +2,13 @@
CHANGES
CHANGES
=======
=======
------
11.3.1
------
* Issue #327: Formalize and restore support for any printable character in an
entry point name.
----
----
11.3
11.3
----
----
...
...
pkg_resources/__init__.py
View file @
32ce4744
...
@@ -2328,7 +2328,7 @@ class EntryPoint(object):
...
@@ -2328,7 +2328,7 @@ class EntryPoint(object):
pattern = re.compile(
pattern = re.compile(
r'
\
s
*
'
r'
\
s
*
'
r'
(
?
P
<
name
>
[
+
\
w
.
-
]
+
?
)
\
s
*
'
r'
(
?
P
<
name
>
.
+
?
)
\
s
*
'
r'
=
\
s
*
'
r'
=
\
s
*
'
r'
(
?
P
<
module
>
[
\
w
.]
+
)
\
s
*
'
r'
(
?
P
<
module
>
[
\
w
.]
+
)
\
s
*
'
r'
(:
\
s
*
(
?
P
<
attr
>
[
\
w
.]
+
))
?
\
s
*
'
r'
(:
\
s
*
(
?
P
<
attr
>
[
\
w
.]
+
))
?
\
s
*
'
...
...
pkg_resources/tests/test_resources.py
View file @
32ce4744
...
@@ -2,6 +2,7 @@ import os
...
@@ -2,6 +2,7 @@ import os
import
sys
import
sys
import
tempfile
import
tempfile
import
shutil
import
shutil
import
string
import
pytest
import
pytest
...
@@ -302,6 +303,16 @@ class TestEntryPoints:
...
@@ -302,6 +303,16 @@ class TestEntryPoints:
except
ValueError
:
pass
except
ValueError
:
pass
else
:
raise
AssertionError
(
"Should've been bad"
,
ep
)
else
:
raise
AssertionError
(
"Should've been bad"
,
ep
)
def
test_printable_name
(
self
):
"""
Allow any printable character in the name.
"""
# Create a name with all printable characters; strip the whitespace.
name
=
string
.
printable
.
strip
()
spec
=
"{name} = module:attr"
.
format
(
**
locals
())
ep
=
EntryPoint
.
parse
(
spec
)
assert
ep
.
name
==
name
def
checkSubMap
(
self
,
m
):
def
checkSubMap
(
self
,
m
):
assert
len
(
m
)
==
len
(
self
.
submap_expect
)
assert
len
(
m
)
==
len
(
self
.
submap_expect
)
for
key
,
ep
in
pkg_resources
.
iteritems
(
self
.
submap_expect
):
for
key
,
ep
in
pkg_resources
.
iteritems
(
self
.
submap_expect
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment