Skip to content

fix: preserve wrapped retry client attributes - #654

Open
Shubham-Padkonde wants to merge 1 commit into
pinterest:masterfrom
Shubham-Padkonde:fix/retrying-client-attributes
Open

Shubham-Padkonde wants to merge 1 commit into
pinterest:masterfrom
Shubham-Padkonde:fix/retrying-client-attributes

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

RetryingClient currently returns a callable for every attribute lookup. As a result, reading client.ignore_exc returns a truthy function instead of False, reading client.server loses the server tuple, and hasattr(client, "missing_method") incorrectly returns True.

Resolve the wrapped attribute first, return non-callable values unchanged, and apply retries only to callable attributes. Missing attributes now raise AttributeError at lookup time, matching the underlying client.

Four new regression cases fail before the fix. All 61 retry-client tests pass afterward, including the existing retry and exception-filter tests. Black 24.4.2, Flake8 7.1.1, and diff whitespace checks pass.

The wider Windows unit run has 494 passed, one skipped, and three failures that also reproduce with the original retry module (Unix socket support and two zero-timeout hash-client tests). The compression module was excluded because its native zstd dependency could not be built on this machine. Live memcached integration tests were not run.

@Shubham-Padkonde
Shubham-Padkonde requested review from a team and jparise as code owners October 3, 2026 05:19
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.

1 participant