Repository navigation
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
sgoel2be24-cyber
force-pushed
the
fix-helpers-deprecated-imports-submodule
branch
from
September 4, 2026 08:17
665f6fb to
2f3bc05
Compare
Contributor
Author
|
Hi maintainers, I rebased this fix onto current main and reverified all 28 focused tests. Could someone review it when available? |
potiuk
approved these changes
Sep 10, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Contributor
Backport successfully created: v3-3-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
potiuk
pushed a commit
that referenced
this pull request
Sep 10, 2026
#71691) (#72868) (cherry picked from commit bb3e71d) Co-authored-by: Shikhar Goel <[email protected]> Co-authored-by: Shikhar Goel <[email protected]> Co-authored-by: Rahul Vats <[email protected]>
This was referenced Sep 13, 2026
Bug: __getattr__ in airflow.utils.helpers raises AttributeError for deprecated dotted imports
#71198
Closed
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In
airflow.utils.helpers,__getattr__resolves deprecated imports from__deprecated_importsby calling__import__(modpath). Because__import__on dotted paths without afromlistreturns the top-level module (airflow) rather than the target submodule (e.g.airflow.sdk.definitions.context), attempting to import moved functions such asfrom airflow.utils.helpers import render_template_as_nativeraisedImportError.This PR changes
__getattr__to useimportlib.import_module(modpath)so that dotted submodules are imported correctly while preserving the deprecation warning.Tests
test_deprecated_importsandtest_deprecated_imports_unknown_attributetoairflow-core/tests/unit/utils/test_helpers.py.test_helpers.pypass.