uranusjr commented on code in PR #25845:
URL: https://github.com/apache/airflow/pull/25845#discussion_r950781600


##########
docs/apache-airflow/howto/operator/python.rst:
##########
@@ -22,8 +22,11 @@
 PythonOperator
 ==============
 
-Use the :class:`~airflow.operators.python.PythonOperator` to execute
-Python callables.
+Use the ``@task`` decorator to execute Python callables.
+
+.. warning::
+    Previous versions of Airflow required using 
:class:`~airflow.operators.python.PythonOperator`
+    to execute Python callables. The ``@task`` decorater is now the 
recommended method.

Review Comment:
   The last version to _require_ using PythonOperator was 1.10.10; I’d probably 
rewrite this to
   
   > The `@task` decorator is recommended to the more “classic” 
`PythonOperator` approach to execute Python callables.



##########
docs/apache-airflow/howto/operator/python.rst:
##########
@@ -22,8 +22,11 @@
 PythonOperator
 ==============
 
-Use the :class:`~airflow.operators.python.PythonOperator` to execute
-Python callables.
+Use the ``@task`` decorator to execute Python callables.
+
+.. warning::
+    Previous versions of Airflow required using 
:class:`~airflow.operators.python.PythonOperator`
+    to execute Python callables. The ``@task`` decorater is now the 
recommended method.

Review Comment:
   The last version to _require_ using PythonOperator was 1.10.10; I’d probably 
rewrite this to
   
   > The `@task` decorator is recommended over the more “classic” 
`PythonOperator` approach to execute Python callables.



-- 
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]

Reply via email to