apache-airflow-providers-sftp 5.4.0rc1__tar.gz → 5.5.1__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 (50) hide show
  1. apache_airflow_providers_sftp-5.5.1/NOTICE +5 -0
  2. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/PKG-INFO +31 -17
  3. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/README.rst +22 -11
  4. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/changelog.rst +64 -4
  5. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/index.rst +13 -12
  6. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/provider.yaml +7 -1
  7. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/pyproject.toml +8 -6
  8. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/__init__.py +3 -3
  9. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/decorators/sensors/sftp.py +1 -10
  10. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/exceptions.py +1 -1
  11. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/get_provider_info.py +1 -0
  12. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/hooks/sftp.py +20 -16
  13. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/operators/sftp.py +11 -11
  14. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/sensors/sftp.py +2 -7
  15. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/triggers/sftp.py +1 -1
  16. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/version_compat.py +2 -12
  17. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/hooks/test_sftp.py +66 -7
  18. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/operators/test_sftp.py +4 -4
  19. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/sensors/test_sftp.py +3 -3
  20. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/triggers/test_sftp.py +1 -1
  21. {apache_airflow_providers_sftp-5.4.0rc1/src/airflow/providers/sftp → apache_airflow_providers_sftp-5.5.1}/LICENSE +0 -0
  22. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/.latest-doc-only-change.txt +0 -0
  23. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/commits.rst +0 -0
  24. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/conf.py +0 -0
  25. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/connections/sftp.rst +0 -0
  26. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/installing-providers-from-sources.rst +0 -0
  27. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/integration-logos/SFTP.png +0 -0
  28. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/security.rst +0 -0
  29. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/docs/sensors/sftp_sensor.rst +0 -0
  30. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/__init__.py +0 -0
  31. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/__init__.py +0 -0
  32. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/decorators/__init__.py +0 -0
  33. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/decorators/sensors/__init__.py +0 -0
  34. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/hooks/__init__.py +0 -0
  35. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/operators/__init__.py +0 -0
  36. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/sensors/__init__.py +0 -0
  37. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/src/airflow/providers/sftp/triggers/__init__.py +0 -0
  38. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/conftest.py +0 -0
  39. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/system/__init__.py +0 -0
  40. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/system/sftp/__init__.py +0 -0
  41. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/system/sftp/example_sftp_sensor.py +0 -0
  42. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/__init__.py +0 -0
  43. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/__init__.py +0 -0
  44. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/decorators/__init__.py +0 -0
  45. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/decorators/sensors/__init__.py +0 -0
  46. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/decorators/sensors/test_sftp.py +0 -0
  47. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/hooks/__init__.py +0 -0
  48. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/operators/__init__.py +0 -0
  49. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/sensors/__init__.py +0 -0
  50. {apache_airflow_providers_sftp-5.4.0rc1 → apache_airflow_providers_sftp-5.5.1}/tests/unit/sftp/triggers/__init__.py +0 -0
@@ -0,0 +1,5 @@
1
+ Apache Airflow
2
+ Copyright 2016-2025 The Apache Software Foundation
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (http://www.apache.org/).
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-sftp
3
- Version: 5.4.0rc1
3
+ Version: 5.5.1
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>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
8
  Requires-Python: >=3.10
9
9
  Description-Content-Type: text/x-rst
10
+ License-Expression: Apache-2.0
10
11
  Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: Environment :: Console
12
13
  Classifier: Environment :: Web Environment
@@ -14,21 +15,23 @@ Classifier: Intended Audience :: Developers
14
15
  Classifier: Intended Audience :: System Administrators
15
16
  Classifier: Framework :: Apache Airflow
16
17
  Classifier: Framework :: Apache Airflow :: Provider
17
- Classifier: License :: OSI Approved :: Apache Software License
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.10.0rc1
24
- Requires-Dist: apache-airflow-providers-ssh>=4.0.0rc1
23
+ License-File: LICENSE
24
+ License-File: NOTICE
25
+ Requires-Dist: apache-airflow>=2.11.0
26
+ Requires-Dist: apache-airflow-providers-ssh>=4.0.0
27
+ Requires-Dist: apache-airflow-providers-common-compat>=1.10.1
25
28
  Requires-Dist: paramiko>=2.9.0,<4.0.0
26
29
  Requires-Dist: asyncssh>=2.12.0
27
30
  Requires-Dist: apache-airflow-providers-common-compat ; extra == "common-compat"
28
31
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
29
32
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
30
- Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-sftp/5.4.0/changelog.html
31
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-sftp/5.4.0
33
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1/changelog.html
34
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1
32
35
  Project-URL: Mastodon, https://fosstodon.org/@airflow
33
36
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
34
37
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -61,7 +64,7 @@ Provides-Extra: openlineage
61
64
 
62
65
  Package ``apache-airflow-providers-sftp``
63
66
 
64
- Release: ``5.4.0``
67
+ Release: ``5.5.1``
65
68
 
66
69
 
67
70
  `SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
@@ -74,7 +77,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
74
77
  are in ``airflow.providers.sftp`` python package.
75
78
 
76
79
  You can find package information and changelog for the provider
77
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.0/>`_.
80
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1/>`_.
78
81
 
79
82
  Installation
80
83
  ------------
@@ -88,14 +91,15 @@ The package supports the following python versions: 3.10,3.11,3.12,3.13
88
91
  Requirements
89
92
  ------------
90
93
 
91
- ================================ ==================
92
- PIP package Version required
93
- ================================ ==================
94
- ``apache-airflow`` ``>=2.10.0``
95
- ``apache-airflow-providers-ssh`` ``>=4.0.0``
96
- ``paramiko`` ``>=2.9.0,<4.0.0``
97
- ``asyncssh`` ``>=2.12.0``
98
- ================================ ==================
94
+ ========================================== ==================
95
+ PIP package Version required
96
+ ========================================== ==================
97
+ ``apache-airflow`` ``>=2.11.0``
98
+ ``apache-airflow-providers-ssh`` ``>=4.0.0``
99
+ ``apache-airflow-providers-common-compat`` ``>=1.10.1``
100
+ ``paramiko`` ``>=2.9.0,<4.0.0``
101
+ ``asyncssh`` ``>=2.12.0``
102
+ ========================================== ==================
99
103
 
100
104
  Cross provider package dependencies
101
105
  -----------------------------------
@@ -118,6 +122,16 @@ Dependent package
118
122
  `apache-airflow-providers-ssh <https://airflow.apache.org/docs/apache-airflow-providers-ssh>`_ ``ssh``
119
123
  ================================================================================================================== =================
120
124
 
125
+ Optional dependencies
126
+ ----------------------
127
+
128
+ ================= ==========================================
129
+ Extra Dependencies
130
+ ================= ==========================================
131
+ ``common.compat`` ``apache-airflow-providers-common-compat``
132
+ ``openlineage`` ``apache-airflow-providers-openlineage``
133
+ ================= ==========================================
134
+
121
135
  The changelog for the provider package can be found in the
122
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.0/changelog.html>`_.
136
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1/changelog.html>`_.
123
137
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-sftp``
25
25
 
26
- Release: ``5.4.0``
26
+ Release: ``5.5.1``
27
27
 
28
28
 
29
29
  `SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
@@ -36,7 +36,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
36
36
  are in ``airflow.providers.sftp`` python package.
37
37
 
38
38
  You can find package information and changelog for the provider
39
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.0/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -50,14 +50,15 @@ The package supports the following python versions: 3.10,3.11,3.12,3.13
50
50
  Requirements
51
51
  ------------
52
52
 
53
- ================================ ==================
54
- PIP package Version required
55
- ================================ ==================
56
- ``apache-airflow`` ``>=2.10.0``
57
- ``apache-airflow-providers-ssh`` ``>=4.0.0``
58
- ``paramiko`` ``>=2.9.0,<4.0.0``
59
- ``asyncssh`` ``>=2.12.0``
60
- ================================ ==================
53
+ ========================================== ==================
54
+ PIP package Version required
55
+ ========================================== ==================
56
+ ``apache-airflow`` ``>=2.11.0``
57
+ ``apache-airflow-providers-ssh`` ``>=4.0.0``
58
+ ``apache-airflow-providers-common-compat`` ``>=1.10.1``
59
+ ``paramiko`` ``>=2.9.0,<4.0.0``
60
+ ``asyncssh`` ``>=2.12.0``
61
+ ========================================== ==================
61
62
 
62
63
  Cross provider package dependencies
63
64
  -----------------------------------
@@ -80,5 +81,15 @@ Dependent package
80
81
  `apache-airflow-providers-ssh <https://airflow.apache.org/docs/apache-airflow-providers-ssh>`_ ``ssh``
81
82
  ================================================================================================================== =================
82
83
 
84
+ Optional dependencies
85
+ ----------------------
86
+
87
+ ================= ==========================================
88
+ Extra Dependencies
89
+ ================= ==========================================
90
+ ``common.compat`` ``apache-airflow-providers-common-compat``
91
+ ``openlineage`` ``apache-airflow-providers-openlineage``
92
+ ================= ==========================================
93
+
83
94
  The changelog for the provider package can be found in the
84
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.0/changelog.html>`_.
95
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1/changelog.html>`_.
@@ -27,11 +27,73 @@
27
27
  Changelog
28
28
  ---------
29
29
 
30
- 5.4.0
30
+ 5.5.1
31
31
  .....
32
32
 
33
+ Bug Fixes
34
+ ~~~~~~~~~
35
+
36
+ * ``fix(sftp): add default port to SFTPHookAsync (#58945)``
37
+
38
+ Misc
39
+ ~~~~
40
+
41
+ * ``Add backcompat for exceptions in providers (#58727)``
42
+
43
+ .. Below changes are excluded from the changelog. Move them to
44
+ appropriate section above if needed. Do not delete the lines(!):
45
+
46
+ 5.5.0
47
+ .....
48
+
49
+ .. note::
50
+ This release of provider is only available for Airflow 2.11+ as explained in the
51
+ Apache Airflow providers support policy <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#minimum-supported-version-of-airflow-for-community-managed-providers>_.
52
+
53
+ Misc
54
+ ~~~~
55
+
56
+ * ``Bump minimum Airflow version in providers to Airflow 2.11.0 (#58612)``
57
+
58
+ .. Below changes are excluded from the changelog. Move them to
59
+ appropriate section above if needed. Do not delete the lines(!):
60
+ * ``Updates to release process of providers (#58316)``
61
+
62
+ 5.4.2
63
+ .....
64
+
65
+ Misc
66
+ ~~~~
67
+
68
+ * ``Convert all airflow distributions to be compliant with ASF requirements (#58138)``
69
+ * ``Migrate sftp provider to 'common.compat' (#57111)``
70
+
71
+ .. Below changes are excluded from the changelog. Move them to
72
+ appropriate section above if needed. Do not delete the lines(!):
73
+ * ``Delete all unnecessary LICENSE Files (#58191)``
74
+ * ``Enable PT006 rule to sftp Provider test (#57924)``
75
+ * ``Fix documentation/provider.yaml consistencies (#57283)``
76
+
77
+ 5.4.1
78
+ .....
79
+
80
+ Bug Fixes
81
+ ~~~~~~~~~
82
+
83
+ * ``Pass required remote_host arg to SSHHook (#55664)``
84
+
85
+ Doc-only
86
+ ~~~~~~~~
87
+
88
+ * ``Remove placeholder Release Date in changelog and index files (#56056)``
89
+
90
+ .. Below changes are excluded from the changelog. Move them to
91
+ appropriate section above if needed. Do not delete the lines(!):
92
+ * ``Enable PT001 rule to prvoider tests (#55935)``
93
+
94
+ 5.4.0
95
+ .....
33
96
 
34
- Release Date: ``|PypiReleaseDate|``
35
97
 
36
98
  Features
37
99
  ~~~~~~~~
@@ -47,8 +109,6 @@ Bug Fixes
47
109
  .. Below changes are excluded from the changelog. Move them to
48
110
  appropriate section above if needed. Do not delete the lines(!):
49
111
  * ``Switch pre-commit to prek (#54258)``
50
-
51
- .. Review and move the new changes to one of the sections above:
52
112
  * ``Fix Airflow 2 reference in README/index of providers (#55240)``
53
113
 
54
114
  5.3.4
@@ -70,7 +70,7 @@ apache-airflow-providers-sftp package
70
70
  `SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
71
71
 
72
72
 
73
- Release: 5.4.0
73
+ Release: 5.5.1
74
74
 
75
75
  Provider package
76
76
  ----------------
@@ -88,16 +88,17 @@ For the minimum Airflow version supported, see ``Requirements`` below.
88
88
  Requirements
89
89
  ------------
90
90
 
91
- The minimum Apache Airflow version supported by this provider distribution is ``2.10.0``.
91
+ The minimum Apache Airflow version supported by this provider distribution is ``2.11.0``.
92
92
 
93
- ================================ ==================
94
- PIP package Version required
95
- ================================ ==================
96
- ``apache-airflow`` ``>=2.10.0``
97
- ``apache-airflow-providers-ssh`` ``>=4.0.0``
98
- ``paramiko`` ``>=2.9.0,<4.0.0``
99
- ``asyncssh`` ``>=2.12.0``
100
- ================================ ==================
93
+ ========================================== ==================
94
+ PIP package Version required
95
+ ========================================== ==================
96
+ ``apache-airflow`` ``>=2.11.0``
97
+ ``apache-airflow-providers-ssh`` ``>=4.0.0``
98
+ ``apache-airflow-providers-common-compat`` ``>=1.10.1``
99
+ ``paramiko`` ``>=2.9.0,<4.0.0``
100
+ ``asyncssh`` ``>=2.12.0``
101
+ ========================================== ==================
101
102
 
102
103
  Cross provider package dependencies
103
104
  -----------------------------------
@@ -126,5 +127,5 @@ Downloading official packages
126
127
  You can download officially released packages and verify their checksums and signatures from the
127
128
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
128
129
 
129
- * `The apache-airflow-providers-sftp 5.4.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.0.tar.gz.sha512>`__)
130
- * `The apache-airflow-providers-sftp 5.4.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.0-py3-none-any.whl.sha512>`__)
130
+ * `The apache-airflow-providers-sftp 5.5.1 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.5.1.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.5.1.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.5.1.tar.gz.sha512>`__)
131
+ * `The apache-airflow-providers-sftp 5.5.1 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.5.1-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.5.1-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.5.1-py3-none-any.whl.sha512>`__)
@@ -22,12 +22,16 @@ description: |
22
22
  `SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1756877505
25
+ source-date-epoch: 1765299399
26
26
  # Note that those versions are maintained by release manager - do not update them manually
27
27
  # with the exception of case where other provider in sources has >= new provider version.
28
28
  # In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
29
29
  # to be done in the same PR
30
30
  versions:
31
+ - 5.5.1
32
+ - 5.5.0
33
+ - 5.4.2
34
+ - 5.4.1
31
35
  - 5.4.0
32
36
  - 5.3.4
33
37
  - 5.3.3
@@ -84,6 +88,8 @@ versions:
84
88
  integrations:
85
89
  - integration-name: SSH File Transfer Protocol (SFTP)
86
90
  external-doc-url: https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/
91
+ how-to-guide:
92
+ - /docs/apache-airflow-providers-sftp/sensors/sftp_sensor.rst
87
93
  logo: /docs/integration-logos/SFTP.png
88
94
  tags: [protocol]
89
95
 
@@ -25,9 +25,11 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-sftp"
28
- version = "5.4.0rc1"
28
+ version = "5.5.1"
29
29
  description = "Provider package apache-airflow-providers-sftp for Apache Airflow"
30
30
  readme = "README.rst"
31
+ license = "Apache-2.0"
32
+ license-files = ['LICENSE', 'NOTICE']
31
33
  authors = [
32
34
  {name="Apache Software Foundation", email="dev@airflow.apache.org"},
33
35
  ]
@@ -43,7 +45,6 @@ classifiers = [
43
45
  "Intended Audience :: System Administrators",
44
46
  "Framework :: Apache Airflow",
45
47
  "Framework :: Apache Airflow :: Provider",
46
- "License :: OSI Approved :: Apache Software License",
47
48
  "Programming Language :: Python :: 3.10",
48
49
  "Programming Language :: Python :: 3.11",
49
50
  "Programming Language :: Python :: 3.12",
@@ -57,8 +58,9 @@ requires-python = ">=3.10"
57
58
  # Make sure to run ``prek update-providers-dependencies --all-files``
58
59
  # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
59
60
  dependencies = [
60
- "apache-airflow>=2.10.0rc1",
61
- "apache-airflow-providers-ssh>=4.0.0rc1",
61
+ "apache-airflow>=2.11.0",
62
+ "apache-airflow-providers-ssh>=4.0.0",
63
+ "apache-airflow-providers-common-compat>=1.10.1",
62
64
  # TODO: Bump to >= 4.0.0 once https://github.com/apache/airflow/issues/54079 is handled
63
65
  "paramiko>=2.9.0,<4.0.0",
64
66
  "asyncssh>=2.12.0",
@@ -111,8 +113,8 @@ apache-airflow-providers-common-sql = {workspace = true}
111
113
  apache-airflow-providers-standard = {workspace = true}
112
114
 
113
115
  [project.urls]
114
- "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-sftp/5.4.0"
115
- "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-sftp/5.4.0/changelog.html"
116
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1"
117
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.5.1/changelog.html"
116
118
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
117
119
  "Source Code" = "https://github.com/apache/airflow"
118
120
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "5.4.0"
32
+ __version__ = "5.5.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.10.0"
35
+ "2.11.0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-sftp:{__version__}` needs Apache Airflow 2.10.0+"
38
+ f"The package `apache-airflow-providers-sftp:{__version__}` needs Apache Airflow 2.11.0+"
39
39
  )
@@ -19,16 +19,7 @@ from __future__ import annotations
19
19
 
20
20
  from collections.abc import Callable, Sequence
21
21
 
22
- from airflow.providers.sftp.version_compat import AIRFLOW_V_3_0_PLUS
23
-
24
- if AIRFLOW_V_3_0_PLUS:
25
- from airflow.sdk.bases.decorator import TaskDecorator, get_unique_task_id, task_decorator_factory
26
- else:
27
- from airflow.decorators.base import ( # type: ignore[no-redef]
28
- TaskDecorator,
29
- get_unique_task_id,
30
- task_decorator_factory,
31
- )
22
+ from airflow.providers.common.compat.sdk import TaskDecorator, get_unique_task_id, task_decorator_factory
32
23
  from airflow.providers.sftp.sensors.sftp import SFTPSensor
33
24
 
34
25
 
@@ -16,7 +16,7 @@
16
16
  # under the License.
17
17
  from __future__ import annotations
18
18
 
19
- from airflow.exceptions import AirflowException
19
+ from airflow.providers.common.compat.sdk import AirflowException
20
20
 
21
21
 
22
22
  class ConnectionNotOpenedException(AirflowException):
@@ -30,6 +30,7 @@ def get_provider_info():
30
30
  {
31
31
  "integration-name": "SSH File Transfer Protocol (SFTP)",
32
32
  "external-doc-url": "https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/",
33
+ "how-to-guide": ["/docs/apache-airflow-providers-sftp/sensors/sftp_sensor.rst"],
33
34
  "logo": "/docs/integration-logos/SFTP.png",
34
35
  "tags": ["protocol"],
35
36
  }
@@ -34,13 +34,11 @@ from typing import IO, TYPE_CHECKING, Any, cast
34
34
 
35
35
  import asyncssh
36
36
  from asgiref.sync import sync_to_async
37
+ from paramiko.config import SSH_PORT
37
38
 
38
- from airflow.exceptions import (
39
- AirflowException,
40
- AirflowProviderDeprecationWarning,
41
- )
39
+ from airflow.exceptions import AirflowProviderDeprecationWarning
40
+ from airflow.providers.common.compat.sdk import AirflowException, BaseHook, Connection
42
41
  from airflow.providers.sftp.exceptions import ConnectionNotOpenedException
43
- from airflow.providers.sftp.version_compat import BaseHook
44
42
  from airflow.providers.ssh.hooks.ssh import SSHHook
45
43
 
46
44
  if TYPE_CHECKING:
@@ -48,8 +46,6 @@ if TYPE_CHECKING:
48
46
  from paramiko.sftp_attr import SFTPAttributes
49
47
  from paramiko.sftp_client import SFTPClient
50
48
 
51
- from airflow.models.connection import Connection
52
-
53
49
 
54
50
  def handle_connection_management(func: Callable) -> Callable:
55
51
  @functools.wraps(func)
@@ -705,10 +701,10 @@ class SFTPHookAsync(BaseHook):
705
701
  def __init__( # nosec: B107
706
702
  self,
707
703
  sftp_conn_id: str = default_conn_name,
708
- host: str = "",
709
- port: int = 22,
710
- username: str = "",
711
- password: str = "",
704
+ host: str | None = None,
705
+ port: int | None = None,
706
+ username: str | None = None,
707
+ password: str | None = None,
712
708
  known_hosts: str = default_known_hosts,
713
709
  key_file: str = "",
714
710
  passphrase: str = "",
@@ -764,11 +760,19 @@ class SFTPHookAsync(BaseHook):
764
760
  if conn.extra is not None:
765
761
  self._parse_extras(conn) # type: ignore[arg-type]
766
762
 
767
- conn_config: dict[str, Any] = {
768
- "host": conn.host,
769
- "port": conn.port,
770
- "username": conn.login,
771
- "password": conn.password,
763
+ def _get_value(self_val, conn_val, default=None):
764
+ """Return the first non-None value among self, conn, default."""
765
+ if self_val is not None:
766
+ return self_val
767
+ if conn_val is not None:
768
+ return conn_val
769
+ return default
770
+
771
+ conn_config = {
772
+ "host": _get_value(self.host, conn.host),
773
+ "port": _get_value(self.port, conn.port, SSH_PORT),
774
+ "username": _get_value(self.username, conn.login),
775
+ "password": _get_value(self.password, conn.password),
772
776
  }
773
777
  if self.key_file:
774
778
  conn_config.update(client_keys=self.key_file)
@@ -27,9 +27,8 @@ from typing import Any
27
27
 
28
28
  import paramiko
29
29
 
30
- from airflow.exceptions import AirflowException
30
+ from airflow.providers.common.compat.sdk import AirflowException, BaseOperator
31
31
  from airflow.providers.sftp.hooks.sftp import SFTPHook
32
- from airflow.providers.sftp.version_compat import BaseOperator
33
32
 
34
33
 
35
34
  class SFTPOperation:
@@ -144,24 +143,25 @@ class SFTPOperator(BaseOperator):
144
143
 
145
144
  file_msg = None
146
145
  try:
146
+ if self.remote_host is not None:
147
+ self.log.info(
148
+ "remote_host is provided explicitly. "
149
+ "It will replace the remote_host which was defined "
150
+ "in sftp_hook or predefined in connection of ssh_conn_id."
151
+ )
152
+
147
153
  if self.ssh_conn_id:
148
154
  if self.sftp_hook and isinstance(self.sftp_hook, SFTPHook):
149
155
  self.log.info("ssh_conn_id is ignored when sftp_hook is provided.")
150
156
  else:
151
157
  self.log.info("sftp_hook not provided or invalid. Trying ssh_conn_id to create SFTPHook.")
152
- self.sftp_hook = SFTPHook(ssh_conn_id=self.ssh_conn_id)
158
+ self.sftp_hook = SFTPHook(
159
+ ssh_conn_id=self.ssh_conn_id, remote_host=self.remote_host or ""
160
+ )
153
161
 
154
162
  if not self.sftp_hook:
155
163
  raise AirflowException("Cannot operate without sftp_hook or ssh_conn_id.")
156
164
 
157
- if self.remote_host is not None:
158
- self.log.info(
159
- "remote_host is provided explicitly. "
160
- "It will replace the remote_host which was defined "
161
- "in sftp_hook or predefined in connection of ssh_conn_id."
162
- )
163
- self.sftp_hook.remote_host = self.remote_host
164
-
165
165
  if self.operation.lower() in (SFTPOperation.GET, SFTPOperation.PUT):
166
166
  for _local_filepath, _remote_filepath in zip(local_filepath_array, remote_filepath_array):
167
167
  if self.operation.lower() == SFTPOperation.GET:
@@ -27,18 +27,13 @@ from typing import TYPE_CHECKING, Any
27
27
  from paramiko.sftp import SFTP_NO_SUCH_FILE
28
28
 
29
29
  from airflow.configuration import conf
30
- from airflow.exceptions import AirflowException
30
+ from airflow.providers.common.compat.sdk import AirflowException, BaseSensorOperator, PokeReturnValue
31
31
  from airflow.providers.sftp.hooks.sftp import SFTPHook
32
32
  from airflow.providers.sftp.triggers.sftp import SFTPTrigger
33
- from airflow.providers.sftp.version_compat import BaseSensorOperator, PokeReturnValue
34
33
  from airflow.utils.timezone import convert_to_utc, parse
35
34
 
36
35
  if TYPE_CHECKING:
37
- try:
38
- from airflow.sdk.definitions.context import Context
39
- except ImportError:
40
- # TODO: Remove once provider drops support for Airflow 2
41
- from airflow.utils.context import Context
36
+ from airflow.providers.common.compat.sdk import Context
42
37
 
43
38
 
44
39
  class SFTPSensor(BaseSensorOperator):
@@ -24,7 +24,7 @@ from typing import Any
24
24
 
25
25
  from dateutil.parser import parse as parse_date
26
26
 
27
- from airflow.exceptions import AirflowException
27
+ from airflow.providers.common.compat.sdk import AirflowException
28
28
  from airflow.providers.sftp.hooks.sftp import SFTPHookAsync
29
29
  from airflow.triggers.base import BaseTrigger, TriggerEvent
30
30
  from airflow.utils.timezone import convert_to_utc
@@ -35,15 +35,5 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
35
35
  AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
36
36
  AIRFLOW_V_3_1_PLUS: bool = get_base_airflow_version_tuple() >= (3, 1, 0)
37
37
 
38
- if AIRFLOW_V_3_1_PLUS:
39
- from airflow.sdk import BaseHook
40
- else:
41
- from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
42
-
43
- if AIRFLOW_V_3_0_PLUS:
44
- from airflow.sdk import BaseOperator, BaseSensorOperator, PokeReturnValue
45
- else:
46
- from airflow.models import BaseOperator
47
- from airflow.sensors.base import BaseSensorOperator, PokeReturnValue # type: ignore[no-redef]
48
-
49
- __all__ = ["AIRFLOW_V_3_0_PLUS", "BaseHook", "BaseOperator", "BaseSensorOperator", "PokeReturnValue"]
38
+
39
+ __all__ = ["AIRFLOW_V_3_0_PLUS", "AIRFLOW_V_3_1_PLUS"]
@@ -31,8 +31,8 @@ from asyncssh.sftp import SFTPName
31
31
  from paramiko.client import SSHClient
32
32
  from paramiko.sftp_client import SFTPClient
33
33
 
34
- from airflow.exceptions import AirflowException
35
34
  from airflow.models import Connection
35
+ from airflow.providers.common.compat.sdk import AirflowException
36
36
  from airflow.providers.sftp.hooks.sftp import SFTPHook, SFTPHookAsync
37
37
 
38
38
 
@@ -442,7 +442,7 @@ class TestSFTPHook:
442
442
  assert hook.key_file == TEST_KEY_FILE
443
443
 
444
444
  @pytest.mark.parametrize(
445
- "path, exists",
445
+ ("path", "exists"),
446
446
  [
447
447
  (TMP_DIR_FOR_TESTS, True),
448
448
  (TMP_FILE_FOR_TESTS, True),
@@ -456,7 +456,7 @@ class TestSFTPHook:
456
456
  assert result == exists
457
457
 
458
458
  @pytest.mark.parametrize(
459
- "path, prefix, delimiter, match",
459
+ ("path", "prefix", "delimiter", "match"),
460
460
  [
461
461
  ("test/path/file.bin", None, None, True),
462
462
  ("test/path/file.bin", "test", None, True),
@@ -762,7 +762,7 @@ class TestSFTPHookAsync:
762
762
  mock_connect.assert_called_with(**expected_connection_details)
763
763
 
764
764
  @pytest.mark.parametrize(
765
- "mock_port, mock_host_key",
765
+ ("mock_port", "mock_host_key"),
766
766
  [
767
767
  (22, "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFe8P8lk5HFfL/rMlcCMHQhw1cg+uZtlK5rXQk2C4pOY"),
768
768
  (2222, "AAAAC3NzaC1lZDI1NTE5AAAAIFe8P8lk5HFfL/rMlcCMHQhw1cg+uZtlK5rXQk2C4pOY"),
@@ -814,11 +814,9 @@ class TestSFTPHookAsync:
814
814
  )
815
815
 
816
816
  hook = SFTPHookAsync()
817
- with pytest.raises(ValueError) as exc:
817
+ with pytest.raises(ValueError, match="Host key check was skipped, but `host_key` value was given"):
818
818
  await hook._get_conn()
819
819
 
820
- assert str(exc.value) == "Host key check was skipped, but `host_key` value was given"
821
-
822
820
  @patch("paramiko.SSHClient.connect")
823
821
  @patch("asyncssh.import_private_key")
824
822
  @patch("asyncssh.connect", new_callable=AsyncMock)
@@ -888,6 +886,67 @@ class TestSFTPHookAsync:
888
886
 
889
887
  mock_connect.assert_called_with(**expected_connection_details)
890
888
 
889
+ @pytest.mark.asyncio
890
+ @patch("asyncssh.connect", new_callable=AsyncMock)
891
+ @patch("airflow.providers.sftp.hooks.sftp.SFTPHookAsync.get_connection")
892
+ async def test_connection_port_default_to_22(self, mock_get_connection, mock_connect):
893
+ from unittest.mock import Mock, call
894
+
895
+ mock_get_connection.return_value = Mock(
896
+ host="localhost",
897
+ port=None,
898
+ login="username",
899
+ password="password",
900
+ extra="{}",
901
+ extra_dejson={},
902
+ )
903
+
904
+ hook = SFTPHookAsync()
905
+ await hook._get_conn()
906
+ assert mock_connect.mock_calls == [
907
+ call(
908
+ host="localhost",
909
+ # Even if the port is not specified in conn_config, it should still default to 22.
910
+ # This behavior is consistent with STPHook.
911
+ port=22,
912
+ username="username",
913
+ password="password",
914
+ known_hosts=None,
915
+ ),
916
+ ]
917
+
918
+ @pytest.mark.asyncio
919
+ @patch("asyncssh.connect", new_callable=AsyncMock)
920
+ @patch("airflow.providers.sftp.hooks.sftp.SFTPHookAsync.get_connection")
921
+ async def test_init_argument_not_ignored(self, mock_get_connection, mock_connect):
922
+ from unittest.mock import Mock, call
923
+
924
+ mock_get_connection.return_value = Mock(
925
+ host="localhost",
926
+ port=None,
927
+ login="username",
928
+ password="password",
929
+ extra="{}",
930
+ extra_dejson={},
931
+ )
932
+
933
+ hook = SFTPHookAsync(
934
+ host="localhost-from-init",
935
+ port=25,
936
+ username="username-from-init",
937
+ password="password-from-init",
938
+ )
939
+ await hook._get_conn()
940
+ assert mock_connect.mock_calls == [
941
+ call(
942
+ host="localhost-from-init",
943
+ port=25,
944
+ username="username-from-init",
945
+ password="password-from-init",
946
+ known_hosts=None,
947
+ ),
948
+ ]
949
+
891
950
  @patch("airflow.providers.sftp.hooks.sftp.SFTPHookAsync._get_conn")
892
951
  @pytest.mark.asyncio
893
952
  async def test_list_directory_path_does_not_exist(self, mock_hook_get_conn):
@@ -26,9 +26,9 @@ from unittest import mock
26
26
  import paramiko
27
27
  import pytest
28
28
 
29
- from airflow.exceptions import AirflowException
30
29
  from airflow.models import DAG, Connection
31
30
  from airflow.providers.common.compat.openlineage.facet import Dataset
31
+ from airflow.providers.common.compat.sdk import AirflowException
32
32
  from airflow.providers.sftp.hooks.sftp import SFTPHook
33
33
  from airflow.providers.sftp.operators.sftp import SFTPOperation, SFTPOperator
34
34
  from airflow.providers.ssh.hooks.ssh import SSHHook
@@ -389,7 +389,7 @@ class TestSFTPOperator:
389
389
  assert task_3.sftp_hook.remote_host == "remotehost"
390
390
 
391
391
  def test_unequal_local_remote_file_paths(self):
392
- with pytest.raises(ValueError):
392
+ with pytest.raises(ValueError, match="1 paths in local_filepath != 2 paths in remote_filepath"):
393
393
  SFTPOperator(
394
394
  task_id="test_sftp_unequal_paths",
395
395
  local_filepath="/tmp/test",
@@ -593,7 +593,7 @@ class TestSFTPOperator:
593
593
  ).execute(None)
594
594
 
595
595
  @pytest.mark.parametrize(
596
- "operation, expected",
596
+ ("operation", "expected"),
597
597
  TEST_GET_PUT_PARAMS,
598
598
  )
599
599
  @mock.patch("airflow.providers.ssh.hooks.ssh.SSHHook.get_conn", spec=paramiko.SSHClient)
@@ -624,7 +624,7 @@ class TestSFTPOperator:
624
624
  assert lineage.outputs == expected[1]
625
625
 
626
626
  @pytest.mark.parametrize(
627
- "operation, expected",
627
+ ("operation", "expected"),
628
628
  TEST_GET_PUT_PARAMS,
629
629
  )
630
630
  @mock.patch("airflow.providers.ssh.hooks.ssh.SSHHook.get_conn", spec=paramiko.SSHClient)
@@ -25,7 +25,7 @@ import pytest
25
25
  from paramiko.sftp import SFTP_FAILURE
26
26
  from pendulum import datetime as pendulum_datetime, timezone
27
27
 
28
- from airflow.exceptions import AirflowException
28
+ from airflow.providers.common.compat.sdk import AirflowException
29
29
  from airflow.providers.sftp.sensors.sftp import SFTPSensor
30
30
  from airflow.sensors.base import PokeReturnValue
31
31
 
@@ -242,7 +242,7 @@ class TestSFTPSensor:
242
242
  assert not output
243
243
 
244
244
  @pytest.mark.parametrize(
245
- "op_args, op_kwargs,",
245
+ ("op_args", "op_kwargs"),
246
246
  [
247
247
  pytest.param(("op_arg_1",), {"key": "value"}),
248
248
  pytest.param((), {}),
@@ -274,7 +274,7 @@ class TestSFTPSensor:
274
274
  }
275
275
 
276
276
  @pytest.mark.parametrize(
277
- "op_args, op_kwargs,",
277
+ ("op_args", "op_kwargs"),
278
278
  [
279
279
  pytest.param(("op_arg_1",), {"key": "value"}),
280
280
  pytest.param((), {}),
@@ -24,7 +24,7 @@ from unittest import mock
24
24
  import pytest
25
25
  from asyncssh.sftp import SFTPAttrs, SFTPName
26
26
 
27
- from airflow.exceptions import AirflowException
27
+ from airflow.providers.common.compat.sdk import AirflowException
28
28
  from airflow.providers.sftp.triggers.sftp import SFTPTrigger
29
29
  from airflow.triggers.base import TriggerEvent
30
30