Hi, thanks for maintaining this project --- I encountered an issue with Python 3.12.
Summary
git-ai-commit fails to run on Python 3.12 with ModuleNotFoundError: No module named 'pkg_resources'.
Steps to Reproduce
- Install Python 3.12 (clean venv)
pip install git-ai-commit
- Run
git-ai-commit --help
Actual Result
...
ModuleNotFoundError: No module named 'pkg_resources'
Root Cause
ai_commit_msg/utils/utils.py imports pkg_resources, which is part of setuptools,
but setuptools is not listed in install_requires in setup.cfg.
Expected Behavior
Installation should include all required dependencies.
Suggested Fix
Short-term (to fix runtime error):
Add setuptools>=65.0 to install_requires in setup.cfg, e.g.:
[options]
install_requires =
setuptools>=65.0
click>=8.0
...
Long-term (to address deprecation):
Replace pkg_resources with the standard library alternative importlib.metadata,
since pkg_resources is deprecated and scheduled for removal after 2025-11-30.
cf.
https://setuptools.pypa.io/en/latest/pkg_resources.html
Environment
python -V
Python 3.12.10
pip show git-ai-commit
Name: git_ai_commit
Version: 1.0.13
Ref
https://github.com/the-cafe/git-ai-commit/blob/8750a213aa7890c4c1e88adbf736df6c34a625f4/ai_commit_msg/services/pip_service.py#L2C1-L3C1
https://github.com/search?q=repo%3Athe-cafe%2Fgit-ai-commit%20pkg_resources%20&type=code
Hi, thanks for maintaining this project --- I encountered an issue with Python 3.12.
Summary
git-ai-commitfails to run on Python 3.12 withModuleNotFoundError: No module named 'pkg_resources'.Steps to Reproduce
pip install git-ai-commitgit-ai-commit --helpActual Result
Root Cause
ai_commit_msg/utils/utils.pyimportspkg_resources, which is part ofsetuptools,but
setuptoolsis not listed ininstall_requiresinsetup.cfg.Expected Behavior
Installation should include all required dependencies.
Suggested Fix
Short-term (to fix runtime error):
Add
setuptools>=65.0toinstall_requiresinsetup.cfg, e.g.:Long-term (to address deprecation):
Replace pkg_resources with the standard library alternative importlib.metadata,
since pkg_resources is deprecated and scheduled for removal after 2025-11-30.
cf.
https://setuptools.pypa.io/en/latest/pkg_resources.html
Environment
Ref
https://github.com/the-cafe/git-ai-commit/blob/8750a213aa7890c4c1e88adbf736df6c34a625f4/ai_commit_msg/services/pip_service.py#L2C1-L3C1
git-ai-commit/setup.cfg
Line 18 in 8750a21
https://github.com/search?q=repo%3Athe-cafe%2Fgit-ai-commit%20pkg_resources%20&type=code