From fd0e16cd45963cd9aef5fa66c5ba2e87ce5c5640 Mon Sep 17 00:00:00 2001 From: Nick Stenning Date: Sun, 6 Oct 2024 13:41:34 +0200 Subject: [PATCH] Use importlib, not pkg_resources pkg_resources requires setuptools and importlib has been available since Python 3.8. Affects #236, #247, #248. --- honcho/command.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/honcho/command.py b/honcho/command.py index a8cb217..fd53dc8 100644 --- a/honcho/command.py +++ b/honcho/command.py @@ -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 @@ -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):