Remove pkg_resources dependency on python 3#279
Remove pkg_resources dependency on python 3#279StykMartin merged 1 commit intobeaker-project:python-3from
Conversation
There was a problem hiding this comment.
Pull request overview
Removes direct pkg_resources usage on Python 3 by introducing a small compatibility layer around importlib.resources / importlib.metadata, and updates call sites to use it.
Changes:
- Added
bkr.common.resourcesmodule providingresource_*helpers anditer_entry_points. - Updated schema parsing and client plugin discovery to use the new helpers instead of
pkg_resources. - Added unit tests covering the new resources helpers.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Common/bkr/common/test_schema.py | Switches schema loading from pkg_resources.resource_stream to the new resource_stream wrapper. |
| Common/bkr/common/test_resources.py | Adds tests for new bkr.common.resources helpers. |
| Common/bkr/common/resources.py | Introduces importlib.resources / importlib.metadata wrappers to replace pkg_resources on Python 3. |
| Common/bkr/init.py | Adjusts namespace package handling to avoid pkg_resources on Python 3. |
| Client/src/bkr/client/main.py | Switches entry point discovery from pkg_resources.iter_entry_points to wrapper. |
| Client/src/bkr/client/commands/cmd_job_submit.py | Switches schema stream loading from pkg_resources to wrapper. |
| Client/src/bkr/client/init.py | Switches resource filename resolution from pkg_resources to wrapper. |
| Client/src/bkr/init.py | Adjusts namespace package handling to avoid pkg_resources on Python 3. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
53f1113 to
675b9ae
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
675b9ae to
f4cf700
Compare
Fixes beaker-project#232 Signed-off-by: Martin Styk <mart.styk@gmail.com>
f4cf700 to
63a89f5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fixes #232