apache-airflow-providers-sftp 4.10.1__py3-none-any.whl → 4.10.2__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.
@@ -215,7 +215,7 @@ Third party Apache 2.0 licenses
215
215
 
216
216
  The following components are provided under the Apache 2.0 License.
217
217
  See project link for details. The text of each license is also included
218
- at licenses/LICENSE-[project].txt.
218
+ at 3rd-party-licenses/LICENSE-[project].txt.
219
219
 
220
220
  (ALv2 License) hue v4.3.0 (https://github.com/cloudera/hue/)
221
221
  (ALv2 License) jqclock v2.3.0 (https://github.com/JohnRDOrazio/jQuery-Clock-Plugin)
@@ -227,7 +227,7 @@ MIT licenses
227
227
  ========================================================================
228
228
 
229
229
  The following components are provided under the MIT License. See project link for details.
230
- The text of each license is also included at licenses/LICENSE-[project].txt.
230
+ The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
231
231
 
232
232
  (MIT License) jquery v3.5.1 (https://jquery.org/license/)
233
233
  (MIT License) dagre-d3 v0.6.4 (https://github.com/cpettitt/dagre-d3)
@@ -243,11 +243,11 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
243
243
  BSD 3-Clause licenses
244
244
  ========================================================================
245
245
  The following components are provided under the BSD 3-Clause license. See project links for details.
246
- The text of each license is also included at licenses/LICENSE-[project].txt.
246
+ The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
247
247
 
248
248
  (BSD 3 License) d3 v5.16.0 (https://d3js.org)
249
249
  (BSD 3 License) d3-shape v2.1.0 (https://github.com/d3/d3-shape)
250
250
  (BSD 3 License) cgroupspy 0.2.1 (https://github.com/cloudsigma/cgroupspy)
251
251
 
252
252
  ========================================================================
253
- See licenses/LICENSES-ui.txt for packages used in `/airflow/www`
253
+ See 3rd-party-licenses/LICENSES-ui.txt for packages used in `/airflow/www`
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "4.10.1"
32
+ __version__ = "4.10.2"
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": 1716289065,
31
+ "source-date-epoch": 1718605359,
32
32
  "versions": [
33
+ "4.10.2",
33
34
  "4.10.1",
34
35
  "4.10.0",
35
36
  "4.9.1",
@@ -70,7 +71,7 @@ def get_provider_info():
70
71
  "dependencies": [
71
72
  "apache-airflow>=2.7.0",
72
73
  "apache-airflow-providers-ssh>=2.1.0",
73
- "paramiko>=2.8.0",
74
+ "paramiko>=2.9.0",
74
75
  "asyncssh>=2.12.0",
75
76
  ],
76
77
  "integrations": [
@@ -549,7 +549,7 @@ class SFTPHookAsync(BaseHook):
549
549
  matched_files = [file for file in files_list if fnmatch(str(file.filename), fnmatch_pattern)]
550
550
  return matched_files
551
551
 
552
- async def get_mod_time(self, path: str) -> str:
552
+ async def get_mod_time(self, path: str) -> str: # type: ignore[return]
553
553
  """
554
554
  Make SFTP async connection.
555
555
 
@@ -558,9 +558,10 @@ class SFTPHookAsync(BaseHook):
558
558
 
559
559
  :param path: full path to the remote file
560
560
  """
561
- ssh_conn = await self._get_conn()
562
- sftp_client = await ssh_conn.start_sftp_client()
561
+ ssh_conn = None
563
562
  try:
563
+ ssh_conn = await self._get_conn()
564
+ sftp_client = await ssh_conn.start_sftp_client()
564
565
  ftp_mdtm = await sftp_client.stat(path)
565
566
  modified_time = ftp_mdtm.mtime
566
567
  mod_time = datetime.datetime.fromtimestamp(modified_time).strftime("%Y%m%d%H%M%S") # type: ignore[arg-type]
@@ -568,3 +569,6 @@ class SFTPHookAsync(BaseHook):
568
569
  return mod_time
569
570
  except asyncssh.SFTPNoSuchFile:
570
571
  raise AirflowException("No files matching")
572
+ finally:
573
+ if ssh_conn:
574
+ ssh_conn.close()
@@ -111,6 +111,19 @@ class SFTPSensor(BaseSensorOperator):
111
111
  _newer_than = convert_to_utc(self.newer_than)
112
112
  if _newer_than <= _mod_time:
113
113
  files_found.append(actual_file_to_check)
114
+ self.log.info(
115
+ "File %s has modification time: '%s', which is newer than: '%s'",
116
+ actual_file_to_check,
117
+ str(_mod_time),
118
+ str(_newer_than),
119
+ )
120
+ else:
121
+ self.log.info(
122
+ "File %s has modification time: '%s', which is older than: '%s'",
123
+ actual_file_to_check,
124
+ str(_mod_time),
125
+ str(_newer_than),
126
+ )
114
127
  else:
115
128
  files_found.append(actual_file_to_check)
116
129
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-sftp
3
- Version: 4.10.1
3
+ Version: 4.10.2
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>
@@ -24,12 +24,12 @@ Classifier: Topic :: System :: Monitoring
24
24
  Requires-Dist: apache-airflow-providers-ssh>=2.1.0
25
25
  Requires-Dist: apache-airflow>=2.7.0
26
26
  Requires-Dist: asyncssh>=2.12.0
27
- Requires-Dist: paramiko>=2.8.0
27
+ Requires-Dist: paramiko>=2.9.0
28
28
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
29
29
  Requires-Dist: apache-airflow-providers-ssh ; extra == "ssh"
30
30
  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.1/changelog.html
32
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.1
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
33
33
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
34
34
  Project-URL: Source Code, https://github.com/apache/airflow
35
35
  Project-URL: Twitter, https://twitter.com/ApacheAirflow
@@ -81,7 +81,7 @@ Provides-Extra: ssh
81
81
 
82
82
  Package ``apache-airflow-providers-sftp``
83
83
 
84
- Release: ``4.10.1``
84
+ Release: ``4.10.2``
85
85
 
86
86
 
87
87
  `SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
@@ -94,7 +94,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
94
94
  are in ``airflow.providers.sftp`` python package.
95
95
 
96
96
  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.1/>`_.
97
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/>`_.
98
98
 
99
99
  Installation
100
100
  ------------
@@ -113,7 +113,7 @@ PIP package Version required
113
113
  ================================ ==================
114
114
  ``apache-airflow`` ``>=2.7.0``
115
115
  ``apache-airflow-providers-ssh`` ``>=2.1.0``
116
- ``paramiko`` ``>=2.8.0``
116
+ ``paramiko`` ``>=2.9.0``
117
117
  ``asyncssh`` ``>=2.12.0``
118
118
  ================================ ==================
119
119
 
@@ -138,4 +138,4 @@ Dependent package
138
138
  ============================================================================================================== ===============
139
139
 
140
140
  The changelog for the provider package can be found in the
141
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.1/changelog.html>`_.
141
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/4.10.2/changelog.html>`_.
@@ -1,18 +1,18 @@
1
- airflow/providers/sftp/LICENSE,sha256=ywUBpKZc7Jb96rVt5I3IDbg7dIJAbUSHkuoDcF3jbH4,13569
2
- airflow/providers/sftp/__init__.py,sha256=yOjEwr2cTvTZxjvE46uRn0X9qR5GTJANbvY8b4TbjOE,1492
3
- airflow/providers/sftp/get_provider_info.py,sha256=rJF2LiIqhg1agl3r4rhGUNAQJ-s-lXN43YIcS2iGpRw,3977
1
+ airflow/providers/sftp/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
2
+ airflow/providers/sftp/__init__.py,sha256=zf-F7fSO-EZSE7-Q4gzW75XFyFY7ngBNo6uJ0cSkPTY,1492
3
+ airflow/providers/sftp/get_provider_info.py,sha256=NUtbmEBCVjRgdfEhrM3ktQ_qYwszMd722xFmmtj3peI,3999
4
4
  airflow/providers/sftp/decorators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
5
5
  airflow/providers/sftp/decorators/sensors/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
6
6
  airflow/providers/sftp/decorators/sensors/sftp.py,sha256=sgKMNvThkZt8MtJJH9QUnT3FdJlu18NAiTzRF08PFSY,2861
7
7
  airflow/providers/sftp/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
8
- airflow/providers/sftp/hooks/sftp.py,sha256=QVgeshBY0zXZOAEUJKc44E0QXRNArNvNsvPWfaLVjeo,21856
8
+ airflow/providers/sftp/hooks/sftp.py,sha256=aJPtAjDhNx1aZQ4WipYM0wQjzAHN12ts0tbSw9woCZk,21987
9
9
  airflow/providers/sftp/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
10
10
  airflow/providers/sftp/operators/sftp.py,sha256=8HbXEm0tB15Fv_8n445z4-PxgQvLE_n-Dhz7wr6Mw8w,11508
11
11
  airflow/providers/sftp/sensors/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
12
- airflow/providers/sftp/sensors/sftp.py,sha256=C2smxNs0xdrRnm369ugEso5m38jSdV3pCoi9KjMJr_Q,7515
12
+ airflow/providers/sftp/sensors/sftp.py,sha256=L5nYm1wKpLCGystl7YGlKH_3m7d9J6QlQSSbV1aFIWE,8087
13
13
  airflow/providers/sftp/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
14
14
  airflow/providers/sftp/triggers/sftp.py,sha256=8CyIeW0h-BFJAcyDqW4YmlSq-Wr4fV-9sA5TquP4fTM,6155
15
- apache_airflow_providers_sftp-4.10.1.dist-info/entry_points.txt,sha256=Fa1IkUHV6qnIuwLd0U7tKoklbLXXVrbB2hhG6N7Q-zo,100
16
- apache_airflow_providers_sftp-4.10.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
17
- apache_airflow_providers_sftp-4.10.1.dist-info/METADATA,sha256=l2sE4RdhjweE8hRP-Sp3H0xoTmBObt5aFnKt8QojGKY,6390
18
- apache_airflow_providers_sftp-4.10.1.dist-info/RECORD,,
15
+ apache_airflow_providers_sftp-4.10.2.dist-info/entry_points.txt,sha256=Fa1IkUHV6qnIuwLd0U7tKoklbLXXVrbB2hhG6N7Q-zo,100
16
+ apache_airflow_providers_sftp-4.10.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
17
+ apache_airflow_providers_sftp-4.10.2.dist-info/METADATA,sha256=WerA151J2b2JSehxmnptD3UlJB8hxxbbgg28tUmhJ2M,6390
18
+ apache_airflow_providers_sftp-4.10.2.dist-info/RECORD,,