apache-airflow-providers-sftp 4.10.2rc1__tar.gz → 4.10.3rc1__tar.gz

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.
Files changed (17) hide show
  1. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/PKG-INFO +16 -13
  2. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/README.rst +11 -10
  3. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/__init__.py +1 -1
  4. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/get_provider_info.py +2 -1
  5. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/hooks/sftp.py +36 -18
  6. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/operators/sftp.py +1 -2
  7. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/pyproject.toml +6 -3
  8. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/LICENSE +0 -0
  9. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/decorators/__init__.py +0 -0
  10. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/decorators/sensors/__init__.py +0 -0
  11. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/decorators/sensors/sftp.py +0 -0
  12. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/hooks/__init__.py +0 -0
  13. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/operators/__init__.py +0 -0
  14. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/sensors/__init__.py +0 -0
  15. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/sensors/sftp.py +0 -0
  16. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/triggers/__init__.py +0 -0
  17. {apache_airflow_providers_sftp-4.10.2rc1 → apache_airflow_providers_sftp-4.10.3rc1}/airflow/providers/sftp/triggers/sftp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-sftp
3
- Version: 4.10.2rc1
3
+ Version: 4.10.3rc1
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>
@@ -25,15 +25,17 @@ Requires-Dist: apache-airflow-providers-ssh>=2.1.0rc0
25
25
  Requires-Dist: apache-airflow>=2.7.0rc0
26
26
  Requires-Dist: asyncssh>=2.12.0
27
27
  Requires-Dist: paramiko>=2.9.0
28
+ Requires-Dist: apache-airflow-providers-common-compat ; extra == "common.compat"
28
29
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
29
30
  Requires-Dist: apache-airflow-providers-ssh ; extra == "ssh"
30
31
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
31
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/changelog.html
32
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2
32
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3/changelog.html
33
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3
33
34
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
34
35
  Project-URL: Source Code, https://github.com/apache/airflow
35
36
  Project-URL: Twitter, https://twitter.com/ApacheAirflow
36
37
  Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
38
+ Provides-Extra: common.compat
37
39
  Provides-Extra: openlineage
38
40
  Provides-Extra: ssh
39
41
 
@@ -81,7 +83,7 @@ Provides-Extra: ssh
81
83
 
82
84
  Package ``apache-airflow-providers-sftp``
83
85
 
84
- Release: ``4.10.2.rc1``
86
+ Release: ``4.10.3.rc1``
85
87
 
86
88
 
87
89
  `SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
@@ -94,7 +96,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
94
96
  are in ``airflow.providers.sftp`` python package.
95
97
 
96
98
  You can find package information and changelog for the provider
97
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/>`_.
99
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3/>`_.
98
100
 
99
101
  Installation
100
102
  ------------
@@ -127,15 +129,16 @@ You can install such cross-provider dependencies when installing from PyPI. For
127
129
 
128
130
  .. code-block:: bash
129
131
 
130
- pip install apache-airflow-providers-sftp[openlineage]
132
+ pip install apache-airflow-providers-sftp[common.compat]
131
133
 
132
134
 
133
- ============================================================================================================== ===============
134
- Dependent package Extra
135
- ============================================================================================================== ===============
136
- `apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
137
- `apache-airflow-providers-ssh <https://airflow.apache.org/docs/apache-airflow-providers-ssh>`_ ``ssh``
138
- ============================================================================================================== ===============
135
+ ================================================================================================================== =================
136
+ Dependent package Extra
137
+ ================================================================================================================== =================
138
+ `apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
139
+ `apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
140
+ `apache-airflow-providers-ssh <https://airflow.apache.org/docs/apache-airflow-providers-ssh>`_ ``ssh``
141
+ ================================================================================================================== =================
139
142
 
140
143
  The changelog for the provider package can be found in the
141
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/changelog.html>`_.
144
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3/changelog.html>`_.
@@ -42,7 +42,7 @@
42
42
 
43
43
  Package ``apache-airflow-providers-sftp``
44
44
 
45
- Release: ``4.10.2.rc1``
45
+ Release: ``4.10.3.rc1``
46
46
 
47
47
 
48
48
  `SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
@@ -55,7 +55,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
55
55
  are in ``airflow.providers.sftp`` python package.
56
56
 
57
57
  You can find package information and changelog for the provider
58
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/>`_.
58
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3/>`_.
59
59
 
60
60
  Installation
61
61
  ------------
@@ -88,15 +88,16 @@ You can install such cross-provider dependencies when installing from PyPI. For
88
88
 
89
89
  .. code-block:: bash
90
90
 
91
- pip install apache-airflow-providers-sftp[openlineage]
91
+ pip install apache-airflow-providers-sftp[common.compat]
92
92
 
93
93
 
94
- ============================================================================================================== ===============
95
- Dependent package Extra
96
- ============================================================================================================== ===============
97
- `apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
98
- `apache-airflow-providers-ssh <https://airflow.apache.org/docs/apache-airflow-providers-ssh>`_ ``ssh``
99
- ============================================================================================================== ===============
94
+ ================================================================================================================== =================
95
+ Dependent package Extra
96
+ ================================================================================================================== =================
97
+ `apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
98
+ `apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
99
+ `apache-airflow-providers-ssh <https://airflow.apache.org/docs/apache-airflow-providers-ssh>`_ ``ssh``
100
+ ================================================================================================================== =================
100
101
 
101
102
  The changelog for the provider package can be found in the
102
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/changelog.html>`_.
103
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3/changelog.html>`_.
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "4.10.2"
32
+ __version__ = "4.10.3"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.7.0"
@@ -28,8 +28,9 @@ def get_provider_info():
28
28
  "name": "SFTP",
29
29
  "description": "`SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__\n",
30
30
  "state": "ready",
31
- "source-date-epoch": 1718605359,
31
+ "source-date-epoch": 1722664831,
32
32
  "versions": [
33
+ "4.10.3",
33
34
  "4.10.2",
34
35
  "4.10.1",
35
36
  "4.10.0",
@@ -40,7 +40,8 @@ if TYPE_CHECKING:
40
40
 
41
41
 
42
42
  class SFTPHook(SSHHook):
43
- """Interact with SFTP.
43
+ """
44
+ Interact with SFTP.
44
45
 
45
46
  This hook inherits the SSH hook. Please refer to SSH hook for the input
46
47
  arguments.
@@ -134,7 +135,8 @@ class SFTPHook(SSHHook):
134
135
  self.conn = None
135
136
 
136
137
  def describe_directory(self, path: str) -> dict[str, dict[str, str | int | None]]:
137
- """Get file information in a directory on the remote system.
138
+ """
139
+ Get file information in a directory on the remote system.
138
140
 
139
141
  The return format is ``{filename: {attributes}}``. The remote system
140
142
  support the MLSD command.
@@ -154,7 +156,8 @@ class SFTPHook(SSHHook):
154
156
  return files
155
157
 
156
158
  def list_directory(self, path: str) -> list[str]:
157
- """List files in a directory on the remote system.
159
+ """
160
+ List files in a directory on the remote system.
158
161
 
159
162
  :param path: full path to the remote directory to list
160
163
  """
@@ -163,7 +166,8 @@ class SFTPHook(SSHHook):
163
166
  return files
164
167
 
165
168
  def mkdir(self, path: str, mode: int = 0o777) -> None:
166
- """Create a directory on the remote system.
169
+ """
170
+ Create a directory on the remote system.
167
171
 
168
172
  The default mode is ``0o777``, but on some systems, the current umask
169
173
  value may be first masked out.
@@ -175,7 +179,8 @@ class SFTPHook(SSHHook):
175
179
  conn.mkdir(path, mode=mode)
176
180
 
177
181
  def isdir(self, path: str) -> bool:
178
- """Check if the path provided is a directory.
182
+ """
183
+ Check if the path provided is a directory.
179
184
 
180
185
  :param path: full path to the remote directory to check
181
186
  """
@@ -187,7 +192,8 @@ class SFTPHook(SSHHook):
187
192
  return result
188
193
 
189
194
  def isfile(self, path: str) -> bool:
190
- """Check if the path provided is a file.
195
+ """
196
+ Check if the path provided is a file.
191
197
 
192
198
  :param path: full path to the remote file to check
193
199
  """
@@ -199,7 +205,8 @@ class SFTPHook(SSHHook):
199
205
  return result
200
206
 
201
207
  def create_directory(self, path: str, mode: int = 0o777) -> None:
202
- """Create a directory on the remote system.
208
+ """
209
+ Create a directory on the remote system.
203
210
 
204
211
  The default mode is ``0o777``, but on some systems, the current umask
205
212
  value may be first masked out. Different from :func:`.mkdir`, this
@@ -224,7 +231,8 @@ class SFTPHook(SSHHook):
224
231
  conn.mkdir(path, mode=mode)
225
232
 
226
233
  def delete_directory(self, path: str) -> None:
227
- """Delete a directory on the remote system.
234
+ """
235
+ Delete a directory on the remote system.
228
236
 
229
237
  :param path: full path to the remote directory to delete
230
238
  """
@@ -232,7 +240,8 @@ class SFTPHook(SSHHook):
232
240
  conn.rmdir(path)
233
241
 
234
242
  def retrieve_file(self, remote_full_path: str, local_full_path: str, prefetch: bool = True) -> None:
235
- """Transfer the remote file to a local location.
243
+ """
244
+ Transfer the remote file to a local location.
236
245
 
237
246
  If local_full_path is a string path, the file will be put
238
247
  at that location.
@@ -245,7 +254,8 @@ class SFTPHook(SSHHook):
245
254
  conn.get(remote_full_path, local_full_path, prefetch=prefetch)
246
255
 
247
256
  def store_file(self, remote_full_path: str, local_full_path: str, confirm: bool = True) -> None:
248
- """Transfer a local file to the remote location.
257
+ """
258
+ Transfer a local file to the remote location.
249
259
 
250
260
  If local_full_path_or_buffer is a string path, the file will be read
251
261
  from that location.
@@ -257,7 +267,8 @@ class SFTPHook(SSHHook):
257
267
  conn.put(local_full_path, remote_full_path, confirm=confirm)
258
268
 
259
269
  def delete_file(self, path: str) -> None:
260
- """Remove a file on the server.
270
+ """
271
+ Remove a file on the server.
261
272
 
262
273
  :param path: full path to the remote file
263
274
  """
@@ -265,7 +276,8 @@ class SFTPHook(SSHHook):
265
276
  conn.remove(path)
266
277
 
267
278
  def get_mod_time(self, path: str) -> str:
268
- """Get an entry's modification time.
279
+ """
280
+ Get an entry's modification time.
269
281
 
270
282
  :param path: full path to the remote file
271
283
  """
@@ -274,7 +286,8 @@ class SFTPHook(SSHHook):
274
286
  return datetime.datetime.fromtimestamp(ftp_mdtm).strftime("%Y%m%d%H%M%S") # type: ignore
275
287
 
276
288
  def path_exists(self, path: str) -> bool:
277
- """Whether a remote entity exists.
289
+ """
290
+ Whether a remote entity exists.
278
291
 
279
292
  :param path: full path to the remote file or directory
280
293
  """
@@ -287,7 +300,8 @@ class SFTPHook(SSHHook):
287
300
 
288
301
  @staticmethod
289
302
  def _is_path_match(path: str, prefix: str | None = None, delimiter: str | None = None) -> bool:
290
- """Whether given path starts with ``prefix`` (if set) and ends with ``delimiter`` (if set).
303
+ """
304
+ Whether given path starts with ``prefix`` (if set) and ends with ``delimiter`` (if set).
291
305
 
292
306
  :param path: path to be checked
293
307
  :param prefix: if set path will be checked is starting with prefix
@@ -308,7 +322,8 @@ class SFTPHook(SSHHook):
308
322
  ucallback: Callable[[str], Any | None],
309
323
  recurse: bool = True,
310
324
  ) -> None:
311
- """Recursively descend, depth first, the directory tree at ``path``.
325
+ """
326
+ Recursively descend, depth first, the directory tree at ``path``.
312
327
 
313
328
  This calls discrete callback functions for each regular file, directory,
314
329
  and unknown file type.
@@ -346,7 +361,8 @@ class SFTPHook(SSHHook):
346
361
  def get_tree_map(
347
362
  self, path: str, prefix: str | None = None, delimiter: str | None = None
348
363
  ) -> tuple[list[str], list[str], list[str]]:
349
- """Get tuple with recursive lists of files, directories and unknown paths.
364
+ """
365
+ Get tuple with recursive lists of files, directories and unknown paths.
350
366
 
351
367
  It is possible to filter results by giving prefix and/or delimiter parameters.
352
368
 
@@ -382,7 +398,8 @@ class SFTPHook(SSHHook):
382
398
  return False, str(e)
383
399
 
384
400
  def get_file_by_pattern(self, path, fnmatch_pattern) -> str:
385
- """Get the first matching file based on the given fnmatch type pattern.
401
+ """
402
+ Get the first matching file based on the given fnmatch type pattern.
386
403
 
387
404
  :param path: path to be checked
388
405
  :param fnmatch_pattern: The pattern that will be matched with `fnmatch`
@@ -395,7 +412,8 @@ class SFTPHook(SSHHook):
395
412
  return ""
396
413
 
397
414
  def get_files_by_pattern(self, path, fnmatch_pattern) -> list[str]:
398
- """Get all matching files based on the given fnmatch type pattern.
415
+ """
416
+ Get all matching files based on the given fnmatch type pattern.
399
417
 
400
418
  :param path: path to be checked
401
419
  :param fnmatch_pattern: The pattern that will be matched with `fnmatch`
@@ -201,8 +201,7 @@ class SFTPOperator(BaseOperator):
201
201
  input: file://<local_host>/path
202
202
  output: file://<remote_host>:<remote_port>/path.
203
203
  """
204
- from openlineage.client.run import Dataset
205
-
204
+ from airflow.providers.common.compat.openlineage.facet import Dataset
206
205
  from airflow.providers.openlineage.extractors import OperatorLineage
207
206
 
208
207
  scheme = "file"
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
28
28
 
29
29
  [project]
30
30
  name = "apache-airflow-providers-sftp"
31
- version = "4.10.2.rc1"
31
+ version = "4.10.3.rc1"
32
32
  description = "Provider package apache-airflow-providers-sftp for Apache Airflow"
33
33
  readme = "README.rst"
34
34
  authors = [
@@ -63,8 +63,8 @@ dependencies = [
63
63
  ]
64
64
 
65
65
  [project.urls]
66
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2"
67
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/changelog.html"
66
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3"
67
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.3/changelog.html"
68
68
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
69
69
  "Source Code" = "https://github.com/apache/airflow"
70
70
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -74,6 +74,9 @@ dependencies = [
74
74
  [project.entry-points."apache_airflow_provider"]
75
75
  provider_info = "airflow.providers.sftp.get_provider_info:get_provider_info"
76
76
  [project.optional-dependencies]
77
+ "common.compat" = [
78
+ "apache-airflow-providers-common-compat",
79
+ ]
77
80
  "openlineage" = [
78
81
  "apache-airflow-providers-openlineage",
79
82
  ]