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
  • Loading branch information
jscheffl committed Nov 2, 2024
1 parent 74a47f6 commit f083716
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 @@ -112,7 +112,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 @@ -132,7 +132,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 f083716

Please sign in to comment.