Repository navigation
Conversation
AsyncCallback, SyncCallback, DeadlineAlert and DeadlineReference are importable from airflow.sdk at runtime via its lazy import map, but the type stub had no entries for them. The Deadline Alerts documentation tells users to write `from airflow.sdk import DeadlineAlert`, which then fails a type check with attr-defined.
airflow.sdk type stubairflow.sdk type stub
27a79a2 to
1d299d8
Compare
|
Closing this asit appears this has already landed. To be clear, your change was right, we just mixed up the merge order. This was split out of #66269 at review request, but #66269 then merged on 29 August still carrying the same six lines in
So the gap you reported is closed, including Thanks for doing the split, and apologies that it ended up unused. If you (or anyone else) sees this and thinks it's a mistake, please let me know. |
AsyncCallback,SyncCallback,DeadlineAlertandDeadlineReferenceare importable fromairflow.sdkat runtime via its lazy import map, buttask-sdk/src/airflow/sdk/__init__.pyihad no entries for them. The Deadline Alerts documentation tells users to writefrom airflow.sdk import DeadlineAlert, which then fails a type check:This adds the four names to the stub's imports and
__all__.SyncCallbackis included for stub/runtime parity — it is a public class inairflow.sdk.definitions.callbackalongsideAsyncCallback, and leaving it out would just reproduce the same gap for the next user.Split out of #66269 at review request — that PR mixed this fix with an example Dag and a serialization fix.
Verification
prek run mypy-task-sdk --all-filespasses.from airflow.sdk import DAG, AsyncCallback, DeadlineAlert, DeadlineReference, tasktypechecks clean undermypy-airflow-core; without it, mypy reports threeattr-definederrors.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines
Important
🛠️ Maintainer triage note for @rapsealk · by
@potiuk· 2026-08-13 12:55 UTCHelpful heads-up from the maintainers — please address before this PR can be reviewed:
Full list of what we check: Pull Request quality criteria.
The ball is in your court — you've been assigned to this PR. Fix the above, then mark it Ready for review.
Automated triage — may be imperfect; a maintainer takes the next look.