This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 55e60992ad base excutor deprecated unused validate_command function 
removal (#41551)
55e60992ad is described below

commit 55e60992ad0ac84359d4924a949d4c720d8204ce
Author: Gopal Dirisala <[email protected]>
AuthorDate: Mon Aug 19 03:07:42 2024 +0530

    base excutor deprecated unused validate_command function removal (#41551)
---
 airflow/executors/base_executor.py    | 18 ------------------
 tests/executors/test_base_executor.py |  8 --------
 2 files changed, 26 deletions(-)

diff --git a/airflow/executors/base_executor.py 
b/airflow/executors/base_executor.py
index 4042377cfa..ad7690b3f6 100644
--- a/airflow/executors/base_executor.py
+++ b/airflow/executors/base_executor.py
@@ -20,7 +20,6 @@ from __future__ import annotations
 
 import logging
 import sys
-import warnings
 from collections import defaultdict, deque
 from dataclasses import dataclass, field
 from typing import TYPE_CHECKING, Any, List, Optional, Sequence, Tuple
@@ -29,7 +28,6 @@ import pendulum
 
 from airflow.cli.cli_config import DefaultHelpParser
 from airflow.configuration import conf
-from airflow.exceptions import RemovedInAirflow3Warning
 from airflow.executors.executor_loader import ExecutorLoader
 from airflow.models import Log
 from airflow.stats import Stats
@@ -584,22 +582,6 @@ class BaseExecutor(LoggingMixin):
         """Number of tasks this executor instance is currently managing."""
         return len(self.running) + len(self.queued_tasks)
 
-    @staticmethod
-    def validate_command(command: list[str]) -> None:
-        """
-        Back-compat method to Check if the command to execute is airflow 
command.
-
-        :param command: command to check
-        """
-        warnings.warn(
-            """
-            The `validate_command` method is deprecated. Please use 
``validate_airflow_tasks_run_command``
-            """,
-            RemovedInAirflow3Warning,
-            stacklevel=2,
-        )
-        BaseExecutor.validate_airflow_tasks_run_command(command)
-
     @staticmethod
     def validate_airflow_tasks_run_command(command: list[str]) -> tuple[str | 
None, str | None]:
         """
diff --git a/tests/executors/test_base_executor.py 
b/tests/executors/test_base_executor.py
index 8a60c50d34..04a70c5e83 100644
--- a/tests/executors/test_base_executor.py
+++ b/tests/executors/test_base_executor.py
@@ -362,14 +362,6 @@ def 
test_empty_airflow_tasks_run_command(generate_command_mock, dag_maker):
     assert dag_id is None, task_id is None
 
 
[email protected]_test
-def test_deprecate_validate_api(dag_maker):
-    dagrun = setup_dagrun(dag_maker)
-    tis = dagrun.task_instances
-    with pytest.warns(DeprecationWarning):
-        BaseExecutor.validate_command(tis[0].command_as_list())
-
-
 def test_debug_dump(caplog):
     executor = BaseExecutor()
     with caplog.at_level(logging.INFO):

Reply via email to