potiuk commented on code in PR #44607: URL: https://github.com/apache/airflow/pull/44607#discussion_r1874396513
########## airflow/__init__.py: ########## @@ -58,10 +58,20 @@ # very easily cause import cycles in the conf init/validate code (since downstream code from # those functions likely import settings). # configuration is therefore initted early here, simply by importing it. + +from packaging.version import Version + from airflow import configuration, settings + +def get_airflow_version() -> Version: + """Return packaging Version object representing the base version.""" + return Version(Version(__version__).base_version) Review Comment: Can we make sure (add pre-commit?) that this method is not used until min-airflow-version is set to 2.11 in all providers? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
