Skip to content

fix: handle partial objects in wait_for_predicate timeout message#795

Closed
nkatha23 wants to merge 1 commit intobitcoin-dev-project:mainfrom
nkatha23:fix/test-base-inspect-partial
Closed

fix: handle partial objects in wait_for_predicate timeout message#795
nkatha23 wants to merge 1 commit intobitcoin-dev-project:mainfrom
nkatha23:fix/test-base-inspect-partial

Conversation

@nkatha23
Copy link
Copy Markdown

@nkatha23 nkatha23 commented Feb 26, 2026

Found this while investigating a CI failure on PR #791. plugin_test was timing out, but instead of seeing the real timeout error, CI was throwing a confusing TypeError because inspect.getsource() doesn't support functools.partial objects. This fix makes the error reporting robust by falling back to repr() when getsource() fails, so the actual timeout reason is visible instead of a misleading TypeError.

inspect.getsource() cannot handle functools.partial objects, causing a
TypeError that masks the original timeout error. Fall back to repr()
if getsource fails.
@pinheadmz
Copy link
Copy Markdown
Contributor

Hi there and sorry for the long delay. I'm looking in to this but what I think makes more sense is just removing partial from the plugin test altogether, it seems unnecessarily abstract. I'll try to simplify that with a PR against main branch and then rebase your onion address work on top so we can see the errors in the CI log more clearly. Thanks!

@nkatha23
Copy link
Copy Markdown
Author

Hi there and sorry for the long delay. I'm looking in to this but what I think makes more sense is just removing partial from the plugin test altogether, it seems unnecessarily abstract. I'll try to simplify that with a PR against main branch and then rebase your onion address work on top so we can see the errors in the CI log more clearly. Thanks!

Thanks for looking into it. That makes total sense. removing the partial entirely is cleaner than patching the error handling around it. I'll close this PR since #803 addresses the root cause. Looking forward to seeing the onion address work rebased on top

@nkatha23 nkatha23 closed this Apr 19, 2026
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.

2 participants