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 1fa18cb974 Remove remaining Airflow 2.5 backcompat code from Docker 
Provider (#36325)
1fa18cb974 is described below

commit 1fa18cb9740a2eb39d079b42ad24787772e5699f
Author: Andrey Anshin <andrey.ans...@taragol.is>
AuthorDate: Wed Dec 20 16:30:38 2023 +0400

    Remove remaining Airflow 2.5 backcompat code from Docker Provider (#36325)
---
 airflow/providers/docker/decorators/docker.py | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/airflow/providers/docker/decorators/docker.py 
b/airflow/providers/docker/decorators/docker.py
index 81ff679f8a..9aafdd1d79 100644
--- a/airflow/providers/docker/decorators/docker.py
+++ b/airflow/providers/docker/decorators/docker.py
@@ -17,10 +17,8 @@
 from __future__ import annotations
 
 import base64
-import inspect
 import os
 import pickle
-import textwrap
 from tempfile import TemporaryDirectory
 from typing import TYPE_CHECKING, Callable, Sequence
 
@@ -28,7 +26,6 @@ import dill
 
 from airflow.decorators.base import DecoratedOperator, task_decorator_factory
 from airflow.providers.docker.operators.docker import DockerOperator
-from airflow.utils.decorators import remove_task_decorator
 from airflow.utils.python_virtualenv import write_python_script
 
 if TYPE_CHECKING:
@@ -129,13 +126,6 @@ class _DockerDecoratedOperator(DecoratedOperator, 
DockerOperator):
             self.command = self.generate_command()
             return super().execute(context)
 
-    # TODO: Remove me once this provider min supported Airflow version is 2.6
-    def get_python_source(self):
-        raw_source = inspect.getsource(self.python_callable)
-        res = textwrap.dedent(raw_source)
-        res = remove_task_decorator(res, self.custom_operator_name)
-        return res
-
     @property
     def pickling_library(self):
         if self.use_dill:

Reply via email to