Skip to content

Commit

Permalink
Avoid newer importlib-metadata APIs for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed May 1, 2024
1 parent e73bdc0 commit bdb34ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setuptools/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ def warn_dash_deprecation(self, opt, section):

def _setuptools_commands(self):
try:
return metadata.distribution('setuptools').entry_points.names
entry_points = metadata.distribution('setuptools').entry_points
return {ep.name for ep in entry_points} # Avoid newer API for compatibility
except metadata.PackageNotFoundError:
# during bootstrapping, distribution doesn't exist
return []
Expand Down

0 comments on commit bdb34ad

Please sign in to comment.