nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.6k stars 146 forks source link

Handle deprecation of pkg_resources and favor importlib #236

Closed jacebrowning closed 1 month ago

jacebrowning commented 2 years ago

Specifically, the Python 3.10 images on CircleCI no longer include pkg_resrouces as it's deprecated:

$ honcho start
Traceback (most recent call last):
  File "/home/circleci/myproject/.venv/bin/honcho", line 5, in <module>
    from honcho.command import main
  File "/home/circleci/myproject/.venv/lib/python3.10/site-packages/honcho/command.py", line 10, in <module>
    from pkg_resources import iter_entry_points
ModuleNotFoundError: No module named 'pkg_resources'

Starting in Python 3.8, importlib.metdata is the preferred way to find entry points.

RealOrangeOne commented 10 months ago

pkg_resources is no longer included in virtual environments from Python 3.12 - making this PR required to run on 3.12.

Alternatively, manually installing setuptools (pip install setuptools) also solves the problem.

@nickstenning as this is going to slowly start becoming more of an issue - any chance of a release? :slightly_smiling_face:

nickstenning commented 1 month ago

Thank you for this! I've fixed this in #249 and will cut a release shortly.