Skip to content

♻️ refactor(utils): remove unused pkg_resources import#86

Open
wolkat wants to merge 2 commits into
the-cafe:mainfrom
wolkat:fix/remove-unused-pkg-resources
Open

♻️ refactor(utils): remove unused pkg_resources import#86
wolkat wants to merge 2 commits into
the-cafe:mainfrom
wolkat:fix/remove-unused-pkg-resources

Conversation

@wolkat

@wolkat wolkat commented May 17, 2026

Copy link
Copy Markdown

Summary

  • Removes unused import pkg_resources from ai_commit_msg/utils/utils.py
  • Replaces pkg_resources.get_distribution() with importlib.metadata.version() in ai_commit_msg/services/pip_service.py
  • Fixes Python 3.12+/3.14 compatibility issue where pkg_resources is no longer available

Changes

File Change
ai_commit_msg/utils/utils.py Removed unused import pkg_resources
ai_commit_msg/services/pip_service.py Replaced deprecated pkg_resources with importlib.metadata

Test Plan

  • Verify the package imports correctly on Python 3.14
  • Verify CLI runs: git-ai-commit --version

Closes: #82

@wolkat wolkat marked this pull request as draft May 17, 2026 16:48
@wolkat wolkat marked this pull request as ready for review May 17, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pkg_resources import fails on Python 3.12 due to missing setuptools dependency

1 participant