-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: modernize importlib #295
base: dev
Are you sure you want to change the base?
Conversation
remove the compat layer for old python versions, use stdlib directly
WalkthroughThe pull request modifies the Changes
Suggested labels
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
ovos_plugin_manager/utils/__init__.py
(2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Run UnitTests
ovos_plugin_manager/utils/__init__.py
[error] 129-129: TypeError: entry_points() got an unexpected keyword argument 'group'. The entry_points() function is being called with an unsupported parameter.
[error] AttributeError: Module does not have the attribute '_iter_entrypoints'
from ovos_utils.log import LOG, log_deprecation, deprecated | ||
from importlib.metadata import entry_points |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure environment compatibility for entry_points()
usage
The pipeline is failing with the error “entry_points() got an unexpected keyword argument 'group'
”. This commonly occurs in Python versions earlier than 3.10, where group
is not a recognized parameter. Either upgrade the runtime to Python 3.10+ or provide a fallback implementation for earlier versions to maintain compatibility.
If you need a fallback approach, I can propose a backward-compatible snippet that filters entry points manually. Would you like me to open a GitHub issue to track this change?
🧰 Tools
🪛 GitHub Actions: Run UnitTests
[error] AttributeError: Module does not have the attribute '_iter_entrypoints'
apparently merging this will require python 3.10 + |
remove the compat layer for old python versions, use stdlib directly
Summary by CodeRabbit
New Features
importlib.metadata
Deprecation
normalize_lang
function as deprecated, recommending use ofstandardize_lang_tag
Refactor
_iter_entrypoints
function and integrated its functionality directly intofind_plugins