Skip to content

Commit

Permalink
Delete get_python_source from Kubernetes decorator after bumping min …
Browse files Browse the repository at this point in the history
…airflow version to 2.6.0 (#36426)
  • Loading branch information
hussein-awala authored Dec 26, 2023
1 parent dd96be5 commit ee219e6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions airflow/providers/cncf/kubernetes/decorators/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
from __future__ import annotations

import base64
import inspect
import os
import pickle
import textwrap
import uuid
from shlex import quote
from tempfile import TemporaryDirectory
Expand All @@ -32,7 +30,6 @@
from airflow.decorators.base import DecoratedOperator, TaskDecorator, task_decorator_factory
from airflow.providers.cncf.kubernetes.operators.pod import KubernetesPodOperator
from airflow.providers.cncf.kubernetes.python_kubernetes_script import (
remove_task_decorator,
write_python_script,
)

Expand Down Expand Up @@ -77,13 +74,6 @@ def __init__(self, namespace: str = "default", use_dill: bool = False, **kwargs)
**kwargs,
)

# 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

def _generate_cmds(self) -> list[str]:
script_filename = "/tmp/script.py"
input_filename = "/tmp/script.in"
Expand Down

0 comments on commit ee219e6

Please sign in to comment.