remove dependency on deprecated pkg_resources#37
Merged
Conversation
There was a problem hiding this comment.
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_resourcesusage ingearbox.mainwithimportlib.metadatafor version and distribution/entry-point handling. - Refactored local plugin detection to work with both
.dist-infoand.egg-infometadata 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.
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #35
pkg_resources.dist-infoand not just.egg-info