Skip to content

Commit

Permalink
Make the validation test for entry-points work with Python 3.13+
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hroncok committed May 14, 2024
1 parent 544b332 commit c6266e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setuptools/_entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def ensure_valid(ep):
"""
try:
ep.extras
except AttributeError as ex:
except (AttributeError, AssertionError) as ex:
# Why both? See https://github.com/python/importlib_metadata/issues/488
msg = (
f"Problems to parse {ep}.\nPlease ensure entry-point follows the spec: "
"https://packaging.python.org/en/latest/specifications/entry-points/"
Expand Down

0 comments on commit c6266e4

Please sign in to comment.