Skip to content

fix: allow bound methods in entrypoint() registration#474

Merged
jesseturner21 merged 2 commits into
mainfrom
fix/bound-method-entrypoint
May 12, 2026
Merged

fix: allow bound methods in entrypoint() registration#474
jesseturner21 merged 2 commits into
mainfrom
fix/bound-method-entrypoint

Conversation

@jesseturner21
Copy link
Copy Markdown
Contributor

Summary

  • Guard the .run attribute assignment in entrypoint() with try/except AttributeError so that bound methods (and other callables without a writable __dict__) can be registered without raising
  • Adds a regression test for the class-based agent pattern

Fixes #473

Test plan

  • test_entrypoint_bound_method passes — registers a bound method without error
  • test_entrypoint_decorator still passes — plain functions still get .run sugar

entrypoint() assigned a .run attribute to the registered callable,
which fails on bound methods (no writable __dict__). Guard with
try/except so class-based agent patterns work.

Fixes #473
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

✅ No Breaking Changes Detected

No public API breaking changes found in this PR.

Copy link
Copy Markdown
Contributor

@tejaskash tejaskash left a comment

Choose a reason for hiding this comment

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

LGTM

@jesseturner21 jesseturner21 enabled auto-merge (squash) May 12, 2026 15:45
@jesseturner21 jesseturner21 merged commit 932db42 into main May 12, 2026
35 of 36 checks passed
@Hweinstock Hweinstock deleted the fix/bound-method-entrypoint branch May 12, 2026 15:52
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.

BedrockAgentCoreApp.entrypoint() raises AttributeError when registering a bound method

2 participants