fix(integrations/hamilton): drop the stale extra argument to require_plugin - #905
Open
Anai-Guo wants to merge 1 commit into
Open
fix(integrations/hamilton): drop the stale extra argument to require_plugin#905Anai-Guo wants to merge 1 commit into
Anai-Guo wants to merge 1 commit into
Conversation
…plugin
require_plugin(import_error, plugin_name) takes two arguments. The hamilton
integration passes three, so when sf-hamilton is not installed the ImportError
handler raises
TypeError: require_plugin() takes 2 positional arguments but 3 were given
instead of the actionable "install burr[hamilton]" message the helper exists to
produce. The other eleven call sites all pass (e, "<extras-target>"); the extra
["sf-hamilton"] here is a leftover from an older signature.
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.
Problem
burr.integrations.base.require_plugintakes two parameters:burr/integrations/hamilton.pypasses three:So importing
burr.integrations.hamiltonwithoutsf-hamiltoninstalled raisesinstead of the actionable message the helper exists to produce. The failure hits
exactly the users the helper is meant to help — the ones who have not installed
the extra.
Sibling baseline
Every one of the other eleven call sites passes
(e, "<extras-target>"):burr/cli/__main__.py:44require_plugin(e, "start")burr/integrations/bedrock.py:65require_plugin(e, "bedrock")burr/integrations/langfuse.py:34require_plugin(e, "langfuse")burr/integrations/opentelemetry.py:40require_plugin(e, "opentelemetry")burr/integrations/streamlit.py:34require_plugin(e, "streamlit")burr/integrations/persisters/b_asyncpg.py:30base.require_plugin(e, "asyncpg")burr/integrations/persisters/b_psycopg2.py:23base.require_plugin(e, "postgresql")burr/integrations/persisters/b_redis.py:25base.require_plugin(e, "redis")burr/integrations/persisters/postgresql.py:26base.require_plugin(e, "postgresql")burr/tracking/client.py:92require_plugin(e, "tracking-client")burr/tracking/common/models.py:30require_plugin(e, "tracking")burr/tracking/s3client.py:58require_plugin(e, "tracking-s3")hamilton.pyis the only one out of step."hamilton"is already the correctvalue:
pyproject.tomldefineshamilton = ["sf-hamilton"]as an extras target,so the message resolves to
burr[hamilton], which is a real install command.Fix
Drop the stale
["sf-hamilton"]argument — one line.Verification
Executing the real
burr/integrations/base.pyand replaying both call shapes:🤖 Generated with Claude Code