Skip to content

Commit

Permalink
Use importlib, not pkg_resources
Browse files Browse the repository at this point in the history
pkg_resources requires setuptools and importlib has been available since
Python 3.8.

Affects #236, #247, #248.
  • Loading branch information
nickstenning committed Oct 6, 2024
1 parent 4b42f33 commit fd0e16c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions honcho/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from collections import ChainMap
from collections import OrderedDict
from collections import defaultdict
from pkg_resources import iter_entry_points
from importlib.metadata import entry_points

from honcho import __version__
from honcho.environ import Env
Expand All @@ -33,8 +33,9 @@
'procfile': 'PROCFILE',
}

export_choices = dict((_export.name, _export)
for _export in iter_entry_points('honcho_exporters'))
export_choices = dict(
(_export.name, _export) for _export in entry_points(group="honcho_exporters")
)


class CommandError(Exception):
Expand Down

0 comments on commit fd0e16c

Please sign in to comment.