Skip to content

fix: restore plain function composition with retry_base via | and &#606

Merged
mergify[bot] merged 1 commit intomainfrom
devs/jd/fix/retry-base-compose-plain-functions/I24e081b67dfa7e184266621f73cec4de5177ea25
Feb 24, 2026
Merged

fix: restore plain function composition with retry_base via | and &#606
mergify[bot] merged 1 commit intomainfrom
devs/jd/fix/retry-base-compose-plain-functions/I24e081b67dfa7e184266621f73cec4de5177ea25

Conversation

@jd
Copy link
Owner

@jd jd commented Feb 24, 2026

The delegation to ror/rand introduced for async retry support
broke composing retry_base instances with plain callables. Add an
isinstance guard so delegation only happens for retry_base subclasses,
while plain callables fall through to direct retry_all/retry_any wrapping.

Also widen type annotations on retry_any/retry_all and the operator
methods to accept RetryBaseT (the union of retry_base and plain
callables), matching the runtime behavior.

Fixes #481

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

The delegation to __ror__/__rand__ introduced for async retry support
broke composing retry_base instances with plain callables. Add an
isinstance guard so delegation only happens for retry_base subclasses,
while plain callables fall through to direct retry_all/retry_any wrapping.

Also widen type annotations on retry_any/retry_all and the operator
methods to accept RetryBaseT (the union of retry_base and plain
callables), matching the runtime behavior.

Fixes #481

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: I24e081b67dfa7e184266621f73cec4de5177ea25
@jd jd marked this pull request as ready for review February 24, 2026 15:47
@mergify mergify bot merged commit a02b51a into main Feb 24, 2026
9 checks passed
@mergify mergify bot deleted the devs/jd/fix/retry-base-compose-plain-functions/I24e081b67dfa7e184266621f73cec4de5177ea25 branch February 24, 2026 15:47
@mergify
Copy link
Contributor

mergify bot commented Feb 24, 2026

Merge Queue Status

Rule: default


  • Entered queue2026-02-24 15:47 UTC
  • Checks passed · in-place
  • Merged2026-02-24 15:47 UTC · at 952b9dfcf7a2547901de8604b572e8ac94262616

This pull request spent 7 seconds in the queue, with no time running CI.

Required conditions to merge

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.

8.4.2 breaks ability to compose regular functions with retry_base

1 participant