nrnavaneet opened a new pull request, #53238:
URL: https://github.com/apache/airflow/pull/53238
This PR enables __slots__ in the DagCallbackRequest Pydantic model using the
model_config = {"slots": True} option introduced in Pydantic v2.
Changes Made:
• Enabled __slots__ to reduce memory overhead and improve attribute
access speed.
• No changes to public API or runtime behavior — fully
backward-compatible.
• Minor docstring improvement to clarify the is_failure_callback field.
Why this matters:
• DagCallbackRequest is instantiated frequently during DAG scheduling.
• It’s a fixed-structure internal data class — ideal for __slots__.
• Avoiding __dict__ saves memory and offers slight performance
improvements at scale.
Testing:
• All existing unit tests pass.
• Pre-commit checks completed successfully.
Closes: #53231
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]