Skip to content

Commit c6266e4

Browse files
committed
Make the validation test for entry-points work with Python 3.13+
The exception in importlib.metadata has changed. See python/importlib_metadata#488 This makes an existing test pass with Python 3.13. Partially fixes pypa#4196
1 parent 544b332 commit c6266e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setuptools/_entry_points.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def ensure_valid(ep):
1717
"""
1818
try:
1919
ep.extras
20-
except AttributeError as ex:
20+
except (AttributeError, AssertionError) as ex:
21+
# Why both? See https://github.com/python/importlib_metadata/issues/488
2122
msg = (
2223
f"Problems to parse {ep}.\nPlease ensure entry-point follows the spec: "
2324
"https://packaging.python.org/en/latest/specifications/entry-points/"

0 commit comments

Comments
 (0)