Skip to content

Commit

Permalink
Fix example_branch_operator failing in python 3.12 (#39783)
Browse files Browse the repository at this point in the history
Recently, this dag started failing due to python 3.12 removal of some
deprecated symbols. The fix here was moving to a higher version of
numpy as the old version uses pinned setuptools
  • Loading branch information
ephraimbuddy committed May 23, 2024
1 parent 5aad588 commit 61e9070
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/example_dags/example_branch_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def branch_with_venv(choices):

branching_venv = BranchPythonVirtualenvOperator(
task_id="branching_venv",
requirements=["numpy~=1.24.4"],
requirements=["numpy~=1.26.0"],
venv_cache_path=VENV_CACHE_PATH,
python_callable=branch_with_venv,
op_args=[options],
Expand All @@ -162,7 +162,7 @@ def hello_world_with_venv():
for option in options:
t = PythonVirtualenvOperator(
task_id=f"venv_{option}",
requirements=["numpy~=1.24.4"],
requirements=["numpy~=1.26.0"],
venv_cache_path=VENV_CACHE_PATH,
python_callable=hello_world_with_venv,
)
Expand Down

0 comments on commit 61e9070

Please sign in to comment.