Skip to content

remove dependency on deprecated pkg_resources#37

Merged
amol- merged 7 commits into
masterfrom
issue-35-command-loading
Mar 11, 2026
Merged

remove dependency on deprecated pkg_resources#37
amol- merged 7 commits into
masterfrom
issue-35-command-loading

Conversation

@amol-
Copy link
Copy Markdown
Member

@amol- amol- commented Mar 11, 2026

Closes #35

  • removes pkg_resources
  • upgrade to support .dist-info and not just .egg-info
  • general refactoring of plugin detection to make it independent from packaging format
  • remove support for Python 3.8 and 3.9

@amol- amol- marked this pull request as ready for review March 11, 2026 22:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the runtime dependency on pkg_resources by switching version and plugin/entry-point discovery to importlib.metadata, while also updating the project’s supported Python versions (dropping 3.8/3.9 and adding 3.14).

Changes:

  • Replaced pkg_resources usage in gearbox.main with importlib.metadata for version and distribution/entry-point handling.
  • Refactored local plugin detection to work with both .dist-info and .egg-info metadata layouts.
  • Updated packaging metadata + CI matrix to require Python >= 3.10 and test through Python 3.14; expanded tests around scaffolding and plugin loading.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
gearbox/main.py Reworks version reporting and project command/plugin discovery away from pkg_resources.
gearbox/utils/plugins.py Adds local distribution discovery via importlib.metadata.distributions() while walking up directories.
gearbox/commands/scaffold.py Fixes --no-package flag behavior and adjusts package init creation for subdir scaffolds.
tests/test_commands.py Adds coverage for dist-info/egg-info plugin discovery and additional scaffold behaviors.
pyproject.toml Sets requires-python >=3.10, updates classifiers, and aligns ruff target-version with py310.
.github/workflows/run_tests.yml Updates action versions and Python matrix to 3.10–3.14.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gearbox/utils/plugins.py Outdated
Comment thread gearbox/main.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gearbox/main.py
Comment thread gearbox/main.py Outdated
Comment thread gearbox/utils/plugins.py
@amol- amol- merged commit cc72b5a into master Mar 11, 2026
5 checks passed
@amol- amol- deleted the issue-35-command-loading branch March 11, 2026 23:35
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.

"gearbox quickstart" with python 3.14.2 reports "No module named 'pkg_resources'"

2 participants