yannlambret opened a new pull request, #50446: URL: https://github.com/apache/airflow/pull/50446
When instantiating a PythonVirtualenvOperator, part of the context is propagated based on the requirements constructor parameter. The current logic implementation prevents 'pendulum' or 'apache-airflow' keys to be added to the Airflow context as soon as a version specifier is used. For instance this requirement list will have the expected behavior: ```python op = PythonVirtualenvOperator( task_id="task", python_callable=func, requirements=["pendulum"], system_site_packages=False, ) ``` Whereas this one will cause the `pendulum` objects to be stripped out of the context: ```python op = PythonVirtualenvOperator( task_id="task", python_callable=func, requirements=["pendulum<3.0"], system_site_packages=False, ) ``` This PR aims to fix these limitations. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org