New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce subpackage airflow.compat #15969
Conversation
Would not that require releasing a new version of Airlfow and having all providers depend on that version? We are already going to release a new version of providers that are going to depend on Airlfow 2.1+, but as I see that will be another similar change and it will require another compatibility-breaking release of providers? |
Err, right, I didn't consider that. I'll revert the The functools ones don't require provider releases since the old imports will still work, the new Airflow version will only add a shortcut to do the same thing. |
b6eb9f1
to
e3cd453
Compare
I've put |
Not really. It also means that when we release new providers (they are always released from master) they will not work with the old versions of airflow that have no The only But I'd reserve it for major versions of Airflow. As soon as we release 2.1 version of airflow we will add-back the check where all providers are built and installed with old version of airlflow (we temporarily removed it before releasing 2.1 and adding "apply_default" incompatibility in the same way), but it will be 2.1 now) - and in this case you will get a failing job. This way we will prevent from accidental usage of this compat in providers (until we decide new wave of providers is >=2.2 for example). |
I even think that (unlike apply_providers) the old imports in providers should stay until 3.0 . There is rather little value in this comparing to the lost backwards-compatibiity with already released (and used) versions of Airflow. But this is perfectly ok to change it for all the "core" parts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to sort out provider compatibility approach for that one.
Eek! Good spot Jarek. |
e3cd453
to
1a5114f
Compare
I've reverted all changes to |
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
This module shims 'cached_property' and 'cache' so modules don't need to all do their own ad-hoc try-except ImportError.
1a5114f
to
814484e
Compare
This module shims 'cached_property' and 'cache' so modules don't need to all do their own ad-hoc try-except ImportError. (cherry picked from commit 3db347e)
This module shims 'cached_property' and 'cache' so modules don't need to all do their own ad-hoc try-except ImportError. (cherry picked from commit 3db347e)
This module shims 'cached_property' and 'cache' so modules don't need to all do their own ad-hoc try-except ImportError. (cherry picked from commit 3db347e)
Spawned from #15397 (comment)
This introduces a shim subpackage
airflow.compat
for all code to import from, instead of ad-hoc try-except.airflow.compat.functools
shimsfunctools.cached_property
(using the third-partycached_property
package) and 'functools.cache' (withfunctools.lru_cache
).Revertedairflow.compat.yaml
was moved fromairflow.utils.yaml
and improved so we can always use it instead of importingyaml
directly.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.