Skip to content

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

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

fix: make Retrying and retry strategies picklable for multiprocessing#615
mergify[bot] merged 1 commit intomainfrom
devs/jd/fix/pickle-support/Ia3cb014c783078a08492014bb7088f10f95e4ae9

Conversation

@jd
Copy link
Owner

@jd jd commented Feb 24, 2026

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
Copy link
Contributor

mergify bot commented Feb 25, 2026

Merge Queue Status

Rule: default


  • Entered queue2026-02-25 08:43 UTC
  • Checks passed · in-place
  • Merged2026-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