apache-airflow-providers-sftp 5.3.3__py3-none-any.whl → 5.3.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "5.3.3"
32
+ __version__ = "5.3.4"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -358,7 +358,11 @@ class SFTPHook(SSHHook):
358
358
  self.retrieve_file(file_path, new_local_path, prefetch)
359
359
 
360
360
  def retrieve_directory_concurrently(
361
- self, remote_full_path: str, local_full_path: str, workers: int = os.cpu_count() or 2
361
+ self,
362
+ remote_full_path: str,
363
+ local_full_path: str,
364
+ workers: int = os.cpu_count() or 2,
365
+ prefetch: bool = True,
362
366
  ) -> None:
363
367
  """
364
368
  Transfer the remote directory to a local location concurrently.
@@ -405,6 +409,7 @@ class SFTPHook(SSHHook):
405
409
  conns[i],
406
410
  local_file_chunks[i],
407
411
  remote_file_chunks[i],
412
+ prefetch,
408
413
  )
409
414
  for i in range(workers)
410
415
  ]
@@ -76,6 +76,7 @@ class SFTPOperator(BaseOperator):
76
76
  )
77
77
  :param concurrency: Number of threads when transferring directories. Each thread opens a new SFTP connection.
78
78
  This parameter is used only when transferring directories, not individual files. (Default is 1)
79
+ :param prefetch: controls whether prefetch is performed (default: True)
79
80
 
80
81
  """
81
82
 
@@ -93,6 +94,7 @@ class SFTPOperator(BaseOperator):
93
94
  confirm: bool = True,
94
95
  create_intermediate_dirs: bool = False,
95
96
  concurrency: int = 1,
97
+ prefetch: bool = True,
96
98
  **kwargs,
97
99
  ) -> None:
98
100
  super().__init__(**kwargs)
@@ -105,6 +107,7 @@ class SFTPOperator(BaseOperator):
105
107
  self.local_filepath = local_filepath
106
108
  self.remote_filepath = remote_filepath
107
109
  self.concurrency = concurrency
110
+ self.prefetch = prefetch
108
111
 
109
112
  def execute(self, context: Any) -> str | list[str] | None:
110
113
  if self.local_filepath is None:
@@ -173,6 +176,7 @@ class SFTPOperator(BaseOperator):
173
176
  _remote_filepath,
174
177
  _local_filepath,
175
178
  workers=self.concurrency,
179
+ prefetch=self.prefetch,
176
180
  )
177
181
  elif self.concurrency == 1:
178
182
  self.sftp_hook.retrieve_directory(_remote_filepath, _local_filepath)
@@ -84,7 +84,7 @@ class SFTPTrigger(BaseTrigger):
84
84
  check whether the last modified time is greater, if true return file if false it polls again.
85
85
  """
86
86
  hook = self._get_async_hook()
87
- exc = None
87
+
88
88
  if isinstance(self.newer_than, str):
89
89
  self.newer_than = parse_date(self.newer_than)
90
90
  _newer_than = convert_to_utc(self.newer_than) if self.newer_than else None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-sftp
3
- Version: 5.3.3
3
+ Version: 5.3.4
4
4
  Summary: Provider package apache-airflow-providers-sftp for Apache Airflow
5
5
  Keywords: airflow-provider,sftp,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
@@ -22,13 +22,13 @@ Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
23
  Requires-Dist: apache-airflow>=2.10.0
24
24
  Requires-Dist: apache-airflow-providers-ssh>=4.0.0
25
- Requires-Dist: paramiko>=2.9.0
25
+ Requires-Dist: paramiko>=2.9.0,<4.0.0
26
26
  Requires-Dist: asyncssh>=2.12.0
27
27
  Requires-Dist: apache-airflow-providers-common-compat ; extra == "common-compat"
28
28
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
29
29
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
30
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/changelog.html
31
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3
30
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.4/changelog.html
31
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.4
32
32
  Project-URL: Mastodon, https://fosstodon.org/@airflow
33
33
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
34
34
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -61,7 +61,7 @@ Provides-Extra: openlineage
61
61
 
62
62
  Package ``apache-airflow-providers-sftp``
63
63
 
64
- Release: ``5.3.3``
64
+ Release: ``5.3.4``
65
65
 
66
66
  Release Date: ``|PypiReleaseDate|``
67
67
 
@@ -75,7 +75,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
75
75
  are in ``airflow.providers.sftp`` python package.
76
76
 
77
77
  You can find package information and changelog for the provider
78
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/>`_.
78
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.4/>`_.
79
79
 
80
80
  Installation
81
81
  ------------
@@ -94,7 +94,7 @@ PIP package Version required
94
94
  ================================ ==================
95
95
  ``apache-airflow`` ``>=2.10.0``
96
96
  ``apache-airflow-providers-ssh`` ``>=4.0.0``
97
- ``paramiko`` ``>=2.9.0``
97
+ ``paramiko`` ``>=2.9.0,<4.0.0``
98
98
  ``asyncssh`` ``>=2.12.0``
99
99
  ================================ ==================
100
100
 
@@ -120,5 +120,5 @@ Dependent package
120
120
  ================================================================================================================== =================
121
121
 
122
122
  The changelog for the provider package can be found in the
123
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/changelog.html>`_.
123
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.4/changelog.html>`_.
124
124
 
@@ -1,19 +1,19 @@
1
1
  airflow/providers/sftp/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/sftp/__init__.py,sha256=2awxmKDxrrpstvCBQStlSJlp5fuVcoqW0wnk-CMLJR8,1493
2
+ airflow/providers/sftp/__init__.py,sha256=2YMYxQjhMFCZJf4PlBMkwgqKrQVpf0spUgcWp9eA5_0,1493
3
3
  airflow/providers/sftp/get_provider_info.py,sha256=_IqUGQ-rKpZsSAsXdTsGYzfzJ3X57duhn-2b0-rFOz0,2905
4
4
  airflow/providers/sftp/version_compat.py,sha256=zRB-sKs65ic8Gl2QARSOaJ8ScjIRw58pt0kR6nOQPPY,2113
5
5
  airflow/providers/sftp/decorators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
6
6
  airflow/providers/sftp/decorators/sensors/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
7
7
  airflow/providers/sftp/decorators/sensors/sftp.py,sha256=O-rkLJ_-B49aRZ5W9vpHcCeMo5bA1DOm_iVdKp8lwLE,3134
8
8
  airflow/providers/sftp/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
9
- airflow/providers/sftp/hooks/sftp.py,sha256=grPNYDOCZLKApVGFSB-cs6FYtvEAsqM2T4HPEDsEMY8,33513
9
+ airflow/providers/sftp/hooks/sftp.py,sha256=zgOrNEBiY9IHGTe3FfyL6XWkDbzcWyLR6KVf_z3Czag,33603
10
10
  airflow/providers/sftp/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
11
- airflow/providers/sftp/operators/sftp.py,sha256=O7vpg6GrBKjSjvrTHat7JVlKIgKaJOSf4awFkY9h5Wo,12963
11
+ airflow/providers/sftp/operators/sftp.py,sha256=exoHmvnsjvefFJF4OatWBexdBm30khjwRvLvhS6Yv08,13163
12
12
  airflow/providers/sftp/sensors/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
13
13
  airflow/providers/sftp/sensors/sftp.py,sha256=NlluZ-UHwL8gzWMOa-QWkJ-ETI3G9w9PMfqxsfBywJA,8487
14
14
  airflow/providers/sftp/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
15
- airflow/providers/sftp/triggers/sftp.py,sha256=fSi-I5FocNQblHt4GYfGispFgOOl8XQ9Vk9ZFLcv_Sw,6182
16
- apache_airflow_providers_sftp-5.3.3.dist-info/entry_points.txt,sha256=Fa1IkUHV6qnIuwLd0U7tKoklbLXXVrbB2hhG6N7Q-zo,100
17
- apache_airflow_providers_sftp-5.3.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
18
- apache_airflow_providers_sftp-5.3.3.dist-info/METADATA,sha256=R9YKXFqeYX0qv8zwXQL2W_Aq_oQs5v5yEkkcQD8F4RA,5718
19
- apache_airflow_providers_sftp-5.3.3.dist-info/RECORD,,
15
+ airflow/providers/sftp/triggers/sftp.py,sha256=e_zdgyg2Y9T2bvCP57a2GZN0rBLW_R_t0V6kquvV2GY,6164
16
+ apache_airflow_providers_sftp-5.3.4.dist-info/entry_points.txt,sha256=Fa1IkUHV6qnIuwLd0U7tKoklbLXXVrbB2hhG6N7Q-zo,100
17
+ apache_airflow_providers_sftp-5.3.4.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
18
+ apache_airflow_providers_sftp-5.3.4.dist-info/METADATA,sha256=yi67e39IMbukOTTEljjPKQJ92AdIcvkuyzf2l9KEVd4,5732
19
+ apache_airflow_providers_sftp-5.3.4.dist-info/RECORD,,