Skip to content

fix: make Retrying and retry strategies picklable for multiprocessing - #615

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/jd/fix/pickle-support/Ia3cb014c783078a08492014bb7088f10f95e4ae9
Feb 25, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
devs/jd/fix/pickle-support/Ia3cb014c783078a08492014bb7088f10f95e4ae9

Conversation

@jd

@jd jd commented Feb 24, 2026

Copy link
Copy Markdown
Owner

Add getstate/setstate to BaseRetrying to exclude the unpicklable
threading.local object during serialization. Replace lambdas in retry
strategy classes with bound methods so they can be pickled with standard
pickle.

Fixes #147

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

Add __getstate__/__setstate__ to BaseRetrying to exclude the unpicklable
threading.local object during serialization. Replace lambdas in retry
strategy classes with bound methods so they can be pickled with standard
pickle.

Fixes #147

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: Ia3cb014c783078a08492014bb7088f10f95e4ae9
@jd
jd marked this pull request as ready for review February 25, 2026 08:43
@mergify
mergify Bot merged commit cb320c4 into main Feb 25, 2026
9 checks passed
@mergify
mergify Bot deleted the devs/jd/fix/pickle-support/Ia3cb014c783078a08492014bb7088f10f95e4ae9 branch February 25, 2026 08:43
@mergify

mergify Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

Rule: default


  • ✅ Entered queue — 2026-02-25 08:43 UTC
  • ✅ Checks passed · in-place
  • ✅ Merged — 2026-02-25 08:43 UTC · at 0d8f3a481b28af121f6e3d2509ad9adf7d30dd70

This pull request spent 5 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.

Play nice with multiprocessing?

1 participant