Skip to content

Conversation

@steveahnahn
Copy link
Contributor

Summary

Convert ResourceMethod and ExtendedResourceMethod from Literal type aliases to proper Enum classes.

This change:

  • Provides runtime validation for HTTP method values
  • Improves IDE autocomplete and discoverability
  • Maintains full backward compatibility (string comparisons still work)
  • Replaces get_args() pattern with cleaner enum iteration

Copy link
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@uranusjr
Copy link
Member

uranusjr commented Jan 8, 2026

Need to fix static checks and compat

@steveahnahn
Copy link
Contributor Author

Added backwards compatibility helpers for Literal→Enum migration

Provider compat tests run against Airflow 3.0.x/3.1.x which still use Literal types.
Helper functions detect type at runtime to support both old (Literal) and new (Enum)

Enum only can be used in future after iterative ver upgrades

@steveahnahn steveahnahn requested a review from bugraoz93 January 11, 2026 20:27
@uranusjr uranusjr merged commit f1b0fdf into apache:main Jan 12, 2026
128 checks passed
iharsh02 pushed a commit to iharsh02/airflow that referenced this pull request Jan 13, 2026
jason810496 pushed a commit to jason810496/airflow that referenced this pull request Jan 22, 2026
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