Skip to content

Fix the deadline_reference decorator's no-parentheses form - #70708

Merged
vatsrahul1001 merged 3 commits into
apache:mainfrom
aws-mwaa:ferruzzi/deadline-reference/decorator-fixes
Aug 3, 2026
Merged

Fix the deadline_reference decorator's no-parentheses form#70708
vatsrahul1001 merged 3 commits into
apache:mainfrom
aws-mwaa:ferruzzi/deadline-reference/decorator-fixes

Conversation

@ferruzzi

Copy link
Copy Markdown
Contributor

Found a couple issues with the @deadline_reference decorator while working on my Summit workshop.

Docs implied that you could use @deadline_reference without parentheses, as was intended behavior, but using it that way would cause a TypeError (without a particularly helpful message) later when it was called. This PR fixes support for the non-paren version, adds a clearer error message for a related instantiation issue, and cleans up the documentation a little to improve clarity.

This is an additive fix, anything that was working before should still work unchanged.


Was generative AI tooling used to co-author this PR?
  • [ x ] Yes (please specify the tool below)

Generated-by: [Kiro-CLI (Claude Opus 5)] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Used bare, the decorator silently rebound the decorated class to the inner decorator function and skipped registration entirely, surfacing later as an unrelated TypeError with an unhelpful message.  Accept both forms, add clearer error messaging when a reference cannot be instantiated, and clarify the related docs.
Comment thread airflow-core/newsfragments/70708.bugfix.rst
@vatsrahul1001 vatsrahul1001 added the backport-to-v3-3-test Backport to v3-3-test label Jul 30, 2026
@vatsrahul1001
vatsrahul1001 merged commit 8541668 into apache:main Aug 3, 2026
107 checks passed
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants