Commits
Click on a commit to change the comparison rangeFix #17354: Preserve class binding in classmethod flows when using
.with_options()
Classmethod flows were losing their cls inheritance structure when
copied with .with_options(), causing them to default to the base class
implementation. This was particularly evident when subclassing
(e.g., ChildProcessor.process would incorrectly use
BaseProcessor.get_multiplier).
The fix ensures proper context preservation by:
1. Creating deep copies of the function for each bound flow
2. Maintaining independent __prefect_self__ references
3. Preserving all function attributes during copying
Added test cases verify:
- Classmethod inheritance is maintained after .with_options()
- Instance methods retain their proper self context
- Multiple bound flows don't interfere with each other