Skip to content

Commit

Permalink
Fix venv numpy example which needs to be 1.26 at least to be working …
Browse files Browse the repository at this point in the history
…in Python 3.12 (#43659)
  • Loading branch information
jscheffl authored Nov 4, 2024
1 parent 07a080e commit 58c18ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/example_dags/example_branch_operator_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def some_ext_py_task():
# Run the example a second time and see that it re-uses it and is faster.
VENV_CACHE_PATH = tempfile.gettempdir()

@task.branch_virtualenv(requirements=["numpy~=1.24.4"], venv_cache_path=VENV_CACHE_PATH)
@task.branch_virtualenv(requirements=["numpy~=1.26.0"], venv_cache_path=VENV_CACHE_PATH)
def branching_virtualenv(choices) -> str:
import random

Expand All @@ -137,7 +137,7 @@ def branching_virtualenv(choices) -> str:
for option in options:

@task.virtualenv(
task_id=f"venv_{option}", requirements=["numpy~=1.24.4"], venv_cache_path=VENV_CACHE_PATH
task_id=f"venv_{option}", requirements=["numpy~=1.26.0"], venv_cache_path=VENV_CACHE_PATH
)
def some_venv_task():
import numpy as np
Expand Down

0 comments on commit 58c18ff

Please sign in to comment.