jscheffl commented on code in PR #42081:
URL: https://github.com/apache/airflow/pull/42081#discussion_r1821594784


##########
providers/src/airflow/providers/standard/operators/python.py:
##########
@@ -732,12 +709,10 @@ def __init__(
                 f"Sys version: {sys.version_info}. Virtual environment 
version: {python_version}"
             )
         if python_version is not None and not isinstance(python_version, str):
-            warnings.warn(
-                "Passing non-string types (e.g. int or float) as 
python_version "
-                "is deprecated. Please use string value instead.",
-                RemovedInAirflow3Warning,
-                stacklevel=2,
+            raise AirflowException(
+                "Passing non-string types (e.g. int or float) as 
python_version not supported"

Review Comment:
   As standard provider is installed as transitive dependency of other 
providers also in Airflow 2.x... and these are using the new operators... I'd 
propose we keep the deprecation warning for now. Or we need to conditionally 
raise if we are running in Airflow 3+ and just emit a warning in Airflow 2?



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

Reply via email to