Skip to content

Commit

Permalink
Add a detailed apache-airflow>=2.6.0 comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vemikhaylov committed Mar 18, 2023
1 parent 7d6d807 commit ca12912
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion airflow/models/xcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.session import NEW_SESSION, provide_session
from airflow.utils.sqlalchemy import UtcDateTime

# XCom constants below are needed for providers backward compatibility,
# which should import the constants directly after apache-airflow>=2.6.0
from airflow.utils.xcom import (
MAX_XCOM_SIZE, # noqa: F401 (#30180 - leaving it for providers backward compatibility)
MAX_XCOM_SIZE, # noqa: F401
XCOM_RETURN_KEY,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/models/test_taskinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ def test_xcom_push_flag(self, dag_maker):
ti = dag_maker.create_dagrun(execution_date=timezone.utcnow()).task_instances[0]
ti.task = task
ti.run()
assert ti.xcom_pull(task_ids=task_id, key=models.XCOM_RETURN_KEY) is None
assert ti.xcom_pull(task_ids=task_id, key=XCOM_RETURN_KEY) is None

def test_post_execute_hook(self, dag_maker):
"""
Expand Down

0 comments on commit ca12912

Please sign in to comment.