bolkedebruin commented on code in PR #37058: URL: https://github.com/apache/airflow/pull/37058#discussion_r1472546549
########## airflow/providers/common/io/xcom/__init__.py: ########## @@ -0,0 +1,37 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +from __future__ import annotations + +import packaging.version + +__all__ = ["__version__"] + +__version__ = "1.3.0" + + +try: + from airflow import __version__ as airflow_version +except ImportError: + from airflow.version import version as airflow_version + +if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse( + "2.9.0" +): + raise RuntimeError( + f"The package `apache-airflow-providers-common-io:{__version__}` needs Apache Airflow 2.9.0+" Review Comment: While possible, I'm not sure if that makes sense (and I am not looking forward to the work involved tbh). No one can make use of the 'bug fix'. I.e. it is a missing feature of the API and it will require a code change on the side of custom implementations to make use of it. It is a bug fix in the sense that you would expect the API to have it as it requires manual clean up on the side of the custom implementation now. In other words I'd like to keep it combined and just decide if the whole thing targets 2.9.0 or 2.8.2. -- 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]
