15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
17
18
- import warnings
19
18
from typing import TYPE_CHECKING , Optional , Sequence , Union
20
19
21
20
from airflow .models import BaseOperator
@@ -38,8 +37,6 @@ class GoogleDriveToGCSOperator(BaseOperator):
38
37
file should be written to
39
38
:param object_name: The Google Cloud Storage object name for the object created by the operator.
40
39
For example: ``path/to/my/file/file.txt``.
41
- :param destination_bucket: Same as bucket_name, but for backward compatibly
42
- :param destination_object: Same as object_name, but for backward compatibly
43
40
:param folder_id: The folder id of the folder in which the Google Drive file resides
44
41
:param file_name: The name of the file residing in Google Drive
45
42
:param drive_id: Optional. The id of the shared Google Drive in which the file resides.
@@ -69,10 +66,8 @@ class GoogleDriveToGCSOperator(BaseOperator):
69
66
def __init__ (
70
67
self ,
71
68
* ,
72
- bucket_name : Optional [ str ] = None ,
69
+ bucket_name : str ,
73
70
object_name : Optional [str ] = None ,
74
- destination_bucket : Optional [str ] = None , # deprecated
75
- destination_object : Optional [str ] = None , # deprecated
76
71
file_name : str ,
77
72
folder_id : str ,
78
73
drive_id : Optional [str ] = None ,
@@ -82,23 +77,8 @@ def __init__(
82
77
** kwargs ,
83
78
) -> None :
84
79
super ().__init__ (** kwargs )
85
- if destination_bucket :
86
- warnings .warn (
87
- "`destination_bucket` is deprecated please use `bucket_name`" ,
88
- DeprecationWarning ,
89
- stacklevel = 2 ,
90
- )
91
- actual_bucket = destination_bucket or bucket_name
92
- if actual_bucket is None :
93
- raise RuntimeError ("One of the destination_bucket or bucket_name must be set" )
94
- self .bucket_name : str = actual_bucket
95
- self .object_name = destination_object or object_name
96
- if destination_object :
97
- warnings .warn (
98
- "`destination_object` is deprecated please use `object_name`" ,
99
- DeprecationWarning ,
100
- stacklevel = 2 ,
101
- )
80
+ self .bucket_name = bucket_name
81
+ self .object_name = object_name
102
82
self .folder_id = folder_id
103
83
self .drive_id = drive_id
104
84
self .file_name = file_name
0 commit comments