uranusjr commented on code in PR #33355:
URL: https://github.com/apache/airflow/pull/33355#discussion_r1336849205
##########
airflow/operators/python.py:
##########
@@ -521,9 +525,15 @@ class
PythonVirtualenvOperator(_BasePythonVirtualenvOperator):
exit code will be treated as a failure.
:param index_urls: an optional list of index urls to load Python packages
from.
If not provided the system pip conf will be used to source packages
from.
+ :param venv_cache_path: Optional path to the virtual environment parent
folder in which the
+ virtual environment will be cached, creates a sub-folder venv-{hash}
whereas hash will be replaced
+ with a checksum of requirements. If not provided the virtual
environment will be created and deleted
+ in a temp folder for every execution.
"""
- template_fields: Sequence[str] = tuple({"requirements"} |
set(PythonOperator.template_fields))
+ template_fields: Sequence[str] = tuple(
+ {"requirements", "index_urls", "venv_cache_path"} |
set(PythonOperator.template_fields)
Review Comment:
```suggestion
{"requirements", "index_urls",
"venv_cache_path"}.union(PythonOperator.template_fields)
```
Saves a set cast.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]