8000 Use absolute / implicit relative imports for local deps · drbruddet/python-docs-samples@c5635d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit c5635d1

Browse files
committed
Use absolute / implicit relative imports for local deps
Since Composer is Python 2.7 only for now, this sample can use implicit relative imports. Airflow doesn't seem to support explicit relative imports when I try to run the use_local_deps.py file in Composer. Aside: Airflow is using the imp.load_source method to load the DAG modules. This will be problematic for Python 3 support, see: https://issues.apache.org/jira/browse/AIRFLOW-2243.
1 parent 230b566 commit c5635d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

composer/workflows/use_local_deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from airflow.operators import bash_operator
2121

2222
# [START composer_dag_local_deps]
23-
from .dependencies import coin_module
23+
from dependencies import coin_module
2424
# [END composer_dag_local_deps]
2525

2626
default_args = {

0 commit comments

Comments
 (0)
0