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


##########
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:
   It's ok to drop it I think. For Airflow 2 people will ue "core embedded" 
Python operator if they don't change import. So no impact for them. If they 
change Import, they **should** expect changes and changing python version to 
string will be no problem then.
   
   The whole idea is that once they move the import  in Airflow 2 they 
**should** get the "full" Airflow 3 experience - and this way they can fix not 
only deprecations, but also errors they might have when they move. 
   
   The only other operator  that uses PythonVirtualenvOperator as base is 
BranchPythonVirtualenvOperator - that is also moved here, so I see no real 
problem with removing deprecation and replacing it with error.



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