apache-airflow-providers-sftp 5.4.0__tar.gz → 5.4.2__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.4.2/NOTICE +5 -0
  2. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/PKG-INFO +29 -15
  3. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/README.rst +22 -11
  4. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/changelog.rst +32 -2
  5. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/index.rst +12 -11
  6. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/provider.yaml +5 -1
  7. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/pyproject.toml +6 -4
  8. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/__init__.py +1 -1
  9. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/decorators/sensors/sftp.py +1 -10
  10. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/get_provider_info.py +1 -0
  11. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/hooks/sftp.py +1 -3
  12. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/operators/sftp.py +11 -10
  13. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/sensors/sftp.py +2 -6
  14. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/version_compat.py +2 -12
  15. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/hooks/test_sftp.py +4 -6
  16. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/operators/test_sftp.py +3 -3
  17. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/sensors/test_sftp.py +2 -2
  18. {apache_airflow_providers_sftp-5.4.0/src/airflow/providers/sftp → apache_airflow_providers_sftp-5.4.2}/LICENSE +0 -0
  19. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/.latest-doc-only-change.txt +0 -0
  20. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/commits.rst +0 -0
  21. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/conf.py +0 -0
  22. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/connections/sftp.rst +0 -0
  23. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/installing-providers-from-sources.rst +0 -0
  24. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/integration-logos/SFTP.png +0 -0
  25. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/security.rst +0 -0
  26. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/docs/sensors/sftp_sensor.rst +0 -0
  27. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/__init__.py +0 -0
  28. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/__init__.py +0 -0
  29. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/decorators/__init__.py +0 -0
  30. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/decorators/sensors/__init__.py +0 -0
  31. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/exceptions.py +0 -0
  32. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/hooks/__init__.py +0 -0
  33. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/operators/__init__.py +0 -0
  34. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/sensors/__init__.py +0 -0
  35. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/triggers/__init__.py +0 -0
  36. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/src/airflow/providers/sftp/triggers/sftp.py +0 -0
  37. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/conftest.py +0 -0
  38. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/system/__init__.py +0 -0
  39. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/system/sftp/__init__.py +0 -0
  40. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/system/sftp/example_sftp_sensor.py +0 -0
  41. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/__init__.py +0 -0
  42. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/__init__.py +0 -0
  43. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/decorators/__init__.py +0 -0
  44. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/decorators/sensors/__init__.py +0 -0
  45. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/decorators/sensors/test_sftp.py +0 -0
  46. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/hooks/__init__.py +0 -0
  47. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/operators/__init__.py +0 -0
  48. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/sensors/__init__.py +0 -0
  49. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/triggers/__init__.py +0 -0
  50. {apache_airflow_providers_sftp-5.4.0 → apache_airflow_providers_sftp-5.4.2}/tests/unit/sftp/triggers/test_sftp.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.0
3
+ Version: 5.4.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>
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
+ License-File: LICENSE
24
+ License-File: NOTICE
23
25
  Requires-Dist: apache-airflow>=2.10.0
24
26
  Requires-Dist: apache-airflow-providers-ssh>=4.0.0
27
+ Requires-Dist: apache-airflow-providers-common-compat>=1.8.0
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.apache.org/docs/apache-airflow-providers-sftp/5.4.0/changelog.html
31
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.0
33
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.2/changelog.html
34
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.2
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.4.2``
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.4.2/>`_.
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.10.0``
98
+ ``apache-airflow-providers-ssh`` ``>=4.0.0``
99
+ ``apache-airflow-providers-common-compat`` ``>=1.8.0``
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.4.2/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.4.2``
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.4.2/>`_.
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.10.0``
57
+ ``apache-airflow-providers-ssh`` ``>=4.0.0``
58
+ ``apache-airflow-providers-common-compat`` ``>=1.8.0``
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.4.2/changelog.html>`_.
@@ -27,11 +27,41 @@
27
27
  Changelog
28
28
  ---------
29
29
 
30
- 5.4.0
30
+ 5.4.2
31
+ .....
32
+
33
+ Misc
34
+ ~~~~
35
+
36
+ * ``Convert all airflow distributions to be compliant with ASF requirements (#58138)``
37
+ * ``Migrate sftp provider to 'common.compat' (#57111)``
38
+
39
+ .. Below changes are excluded from the changelog. Move them to
40
+ appropriate section above if needed. Do not delete the lines(!):
41
+ * ``Delete all unnecessary LICENSE Files (#58191)``
42
+ * ``Enable PT006 rule to sftp Provider test (#57924)``
43
+ * ``Fix documentation/provider.yaml consistencies (#57283)``
44
+
45
+ 5.4.1
31
46
  .....
32
47
 
48
+ Bug Fixes
49
+ ~~~~~~~~~
50
+
51
+ * ``Pass required remote_host arg to SSHHook (#55664)``
52
+
53
+ Doc-only
54
+ ~~~~~~~~
55
+
56
+ * ``Remove placeholder Release Date in changelog and index files (#56056)``
57
+
58
+ .. Below changes are excluded from the changelog. Move them to
59
+ appropriate section above if needed. Do not delete the lines(!):
60
+ * ``Enable PT001 rule to prvoider tests (#55935)``
61
+
62
+ 5.4.0
63
+ .....
33
64
 
34
- Release Date: ``|PypiReleaseDate|``
35
65
 
36
66
  Features
37
67
  ~~~~~~~~
@@ -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.4.2
74
74
 
75
75
  Provider package
76
76
  ----------------
@@ -90,14 +90,15 @@ Requirements
90
90
 
91
91
  The minimum Apache Airflow version supported by this provider distribution is ``2.10.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.10.0``
97
+ ``apache-airflow-providers-ssh`` ``>=4.0.0``
98
+ ``apache-airflow-providers-common-compat`` ``>=1.8.0``
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.4.2 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.2.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.2.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.2.tar.gz.sha512>`__)
131
+ * `The apache-airflow-providers-sftp 5.4.2 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.2-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.2-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.4.2-py3-none-any.whl.sha512>`__)
@@ -22,12 +22,14 @@ 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: 1763070330
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.4.2
32
+ - 5.4.1
31
33
  - 5.4.0
32
34
  - 5.3.4
33
35
  - 5.3.3
@@ -84,6 +86,8 @@ versions:
84
86
  integrations:
85
87
  - integration-name: SSH File Transfer Protocol (SFTP)
86
88
  external-doc-url: https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/
89
+ how-to-guide:
90
+ - /docs/apache-airflow-providers-sftp/sensors/sftp_sensor.rst
87
91
  logo: /docs/integration-logos/SFTP.png
88
92
  tags: [protocol]
89
93
 
@@ -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.0"
28
+ version = "5.4.2"
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",
@@ -59,6 +60,7 @@ requires-python = ">=3.10"
59
60
  dependencies = [
60
61
  "apache-airflow>=2.10.0",
61
62
  "apache-airflow-providers-ssh>=4.0.0",
63
+ "apache-airflow-providers-common-compat>=1.8.0",
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.apache.org/docs/apache-airflow-providers-sftp/5.4.0"
115
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.0/changelog.html"
116
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.2"
117
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.4.2/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,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "5.4.0"
32
+ __version__ = "5.4.2"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -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
 
@@ -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
  }
@@ -39,8 +39,8 @@ from airflow.exceptions import (
39
39
  AirflowException,
40
40
  AirflowProviderDeprecationWarning,
41
41
  )
42
+ from airflow.providers.common.compat.sdk import BaseHook, Connection
42
43
  from airflow.providers.sftp.exceptions import ConnectionNotOpenedException
43
- from airflow.providers.sftp.version_compat import BaseHook
44
44
  from airflow.providers.ssh.hooks.ssh import SSHHook
45
45
 
46
46
  if TYPE_CHECKING:
@@ -48,8 +48,6 @@ if TYPE_CHECKING:
48
48
  from paramiko.sftp_attr import SFTPAttributes
49
49
  from paramiko.sftp_client import SFTPClient
50
50
 
51
- from airflow.models.connection import Connection
52
-
53
51
 
54
52
  def handle_connection_management(func: Callable) -> Callable:
55
53
  @functools.wraps(func)
@@ -28,8 +28,8 @@ from typing import Any
28
28
  import paramiko
29
29
 
30
30
  from airflow.exceptions import AirflowException
31
+ from airflow.providers.common.compat.sdk import BaseOperator
31
32
  from airflow.providers.sftp.hooks.sftp import SFTPHook
32
- from airflow.providers.sftp.version_compat import BaseOperator
33
33
 
34
34
 
35
35
  class SFTPOperation:
@@ -144,24 +144,25 @@ class SFTPOperator(BaseOperator):
144
144
 
145
145
  file_msg = None
146
146
  try:
147
+ if self.remote_host is not None:
148
+ self.log.info(
149
+ "remote_host is provided explicitly. "
150
+ "It will replace the remote_host which was defined "
151
+ "in sftp_hook or predefined in connection of ssh_conn_id."
152
+ )
153
+
147
154
  if self.ssh_conn_id:
148
155
  if self.sftp_hook and isinstance(self.sftp_hook, SFTPHook):
149
156
  self.log.info("ssh_conn_id is ignored when sftp_hook is provided.")
150
157
  else:
151
158
  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)
159
+ self.sftp_hook = SFTPHook(
160
+ ssh_conn_id=self.ssh_conn_id, remote_host=self.remote_host or ""
161
+ )
153
162
 
154
163
  if not self.sftp_hook:
155
164
  raise AirflowException("Cannot operate without sftp_hook or ssh_conn_id.")
156
165
 
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
166
  if self.operation.lower() in (SFTPOperation.GET, SFTPOperation.PUT):
166
167
  for _local_filepath, _remote_filepath in zip(local_filepath_array, remote_filepath_array):
167
168
  if self.operation.lower() == SFTPOperation.GET:
@@ -28,17 +28,13 @@ from paramiko.sftp import SFTP_NO_SUCH_FILE
28
28
 
29
29
  from airflow.configuration import conf
30
30
  from airflow.exceptions import AirflowException
31
+ from airflow.providers.common.compat.sdk import BaseSensorOperator, PokeReturnValue
31
32
  from airflow.providers.sftp.hooks.sftp import SFTPHook
32
33
  from airflow.providers.sftp.triggers.sftp import SFTPTrigger
33
- from airflow.providers.sftp.version_compat import BaseSensorOperator, PokeReturnValue
34
34
  from airflow.utils.timezone import convert_to_utc, parse
35
35
 
36
36
  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
37
+ from airflow.providers.common.compat.sdk import Context
42
38
 
43
39
 
44
40
  class SFTPSensor(BaseSensorOperator):
@@ -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"]
@@ -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)
@@ -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)
@@ -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((), {}),