apache-airflow-providers-sftp 5.3.2__tar.gz → 5.3.3__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.
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/PKG-INFO +12 -10
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/README.rst +6 -5
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/changelog.rst +28 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/index.rst +6 -4
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/sensors/sftp_sensor.rst +1 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/provider.yaml +2 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/pyproject.toml +6 -5
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/__init__.py +1 -1
- {apache_airflow_providers_sftp-5.3.2/tests/system → apache_airflow_providers_sftp-5.3.3/src/airflow/providers}/__init__.py +1 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/__init__.py +1 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/hooks/sftp.py +20 -8
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/version_compat.py +7 -1
- {apache_airflow_providers_sftp-5.3.2/src/airflow/providers → apache_airflow_providers_sftp-5.3.3/tests/system}/__init__.py +1 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/system/sftp/example_sftp_sensor.py +7 -3
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/__init__.py +1 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/decorators/sensors/test_sftp.py +6 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/hooks/test_sftp.py +1 -1
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/.latest-doc-only-change.txt +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/commits.rst +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/conf.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/connections/sftp.rst +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/integration-logos/SFTP.png +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/security.rst +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/LICENSE +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/decorators/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/decorators/sensors/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/decorators/sensors/sftp.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/get_provider_info.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/hooks/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/operators/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/operators/sftp.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/sensors/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/sensors/sftp.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/triggers/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/providers/sftp/triggers/sftp.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/conftest.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/system/sftp/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/decorators/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/decorators/sensors/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/hooks/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/operators/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/operators/test_sftp.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/sensors/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/sensors/test_sftp.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/triggers/__init__.py +0 -0
- {apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/sftp/triggers/test_sftp.py +0 -0
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-sftp
|
3
|
-
Version: 5.3.
|
3
|
+
Version: 5.3.3
|
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
|
-
Requires-Python:
|
8
|
+
Requires-Python: >=3.10
|
9
9
|
Description-Content-Type: text/x-rst
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
11
11
|
Classifier: Environment :: Console
|
@@ -18,16 +18,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
|
+
Classifier: Programming Language :: Python :: 3.13
|
21
22
|
Classifier: Topic :: System :: Monitoring
|
22
23
|
Requires-Dist: apache-airflow>=2.10.0
|
23
|
-
Requires-Dist: apache-airflow-providers-ssh>=
|
24
|
+
Requires-Dist: apache-airflow-providers-ssh>=4.0.0
|
24
25
|
Requires-Dist: paramiko>=2.9.0
|
25
26
|
Requires-Dist: asyncssh>=2.12.0
|
26
27
|
Requires-Dist: apache-airflow-providers-common-compat ; extra == "common-compat"
|
27
28
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
28
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
29
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
30
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
30
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/changelog.html
|
31
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3
|
31
32
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
32
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
33
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
@@ -60,8 +61,9 @@ Provides-Extra: openlineage
|
|
60
61
|
|
61
62
|
Package ``apache-airflow-providers-sftp``
|
62
63
|
|
63
|
-
Release: ``5.3.
|
64
|
+
Release: ``5.3.3``
|
64
65
|
|
66
|
+
Release Date: ``|PypiReleaseDate|``
|
65
67
|
|
66
68
|
`SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
|
67
69
|
|
@@ -73,7 +75,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
|
|
73
75
|
are in ``airflow.providers.sftp`` python package.
|
74
76
|
|
75
77
|
You can find package information and changelog for the provider
|
76
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
78
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/>`_.
|
77
79
|
|
78
80
|
Installation
|
79
81
|
------------
|
@@ -82,7 +84,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
|
|
82
84
|
for the minimum Airflow version supported) via
|
83
85
|
``pip install apache-airflow-providers-sftp``
|
84
86
|
|
85
|
-
The package supports the following python versions: 3.10,3.11,3.12
|
87
|
+
The package supports the following python versions: 3.10,3.11,3.12,3.13
|
86
88
|
|
87
89
|
Requirements
|
88
90
|
------------
|
@@ -91,7 +93,7 @@ Requirements
|
|
91
93
|
PIP package Version required
|
92
94
|
================================ ==================
|
93
95
|
``apache-airflow`` ``>=2.10.0``
|
94
|
-
``apache-airflow-providers-ssh`` ``>=
|
96
|
+
``apache-airflow-providers-ssh`` ``>=4.0.0``
|
95
97
|
``paramiko`` ``>=2.9.0``
|
96
98
|
``asyncssh`` ``>=2.12.0``
|
97
99
|
================================ ==================
|
@@ -118,5 +120,5 @@ Dependent package
|
|
118
120
|
================================================================================================================== =================
|
119
121
|
|
120
122
|
The changelog for the provider package can be found in the
|
121
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
123
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/changelog.html>`_.
|
122
124
|
|
@@ -23,8 +23,9 @@
|
|
23
23
|
|
24
24
|
Package ``apache-airflow-providers-sftp``
|
25
25
|
|
26
|
-
Release: ``5.3.
|
26
|
+
Release: ``5.3.3``
|
27
27
|
|
28
|
+
Release Date: ``|PypiReleaseDate|``
|
28
29
|
|
29
30
|
`SSH File Transfer Protocol (SFTP) <https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/>`__
|
30
31
|
|
@@ -36,7 +37,7 @@ This is a provider package for ``sftp`` provider. All classes for this provider
|
|
36
37
|
are in ``airflow.providers.sftp`` python package.
|
37
38
|
|
38
39
|
You can find package information and changelog for the provider
|
39
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
40
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/>`_.
|
40
41
|
|
41
42
|
Installation
|
42
43
|
------------
|
@@ -45,7 +46,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
|
|
45
46
|
for the minimum Airflow version supported) via
|
46
47
|
``pip install apache-airflow-providers-sftp``
|
47
48
|
|
48
|
-
The package supports the following python versions: 3.10,3.11,3.12
|
49
|
+
The package supports the following python versions: 3.10,3.11,3.12,3.13
|
49
50
|
|
50
51
|
Requirements
|
51
52
|
------------
|
@@ -54,7 +55,7 @@ Requirements
|
|
54
55
|
PIP package Version required
|
55
56
|
================================ ==================
|
56
57
|
``apache-airflow`` ``>=2.10.0``
|
57
|
-
``apache-airflow-providers-ssh`` ``>=
|
58
|
+
``apache-airflow-providers-ssh`` ``>=4.0.0``
|
58
59
|
``paramiko`` ``>=2.9.0``
|
59
60
|
``asyncssh`` ``>=2.12.0``
|
60
61
|
================================ ==================
|
@@ -81,4 +82,4 @@ Dependent package
|
|
81
82
|
================================================================================================================== =================
|
82
83
|
|
83
84
|
The changelog for the provider package can be found in the
|
84
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
85
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/changelog.html>`_.
|
{apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/changelog.rst
RENAMED
@@ -27,6 +27,34 @@
|
|
27
27
|
Changelog
|
28
28
|
---------
|
29
29
|
|
30
|
+
5.3.3
|
31
|
+
.....
|
32
|
+
|
33
|
+
Bug Fixes
|
34
|
+
~~~~~~~~~
|
35
|
+
|
36
|
+
* ``Updating SSH dependency for SFTP provider (#53100)``
|
37
|
+
* ``Fix BlobWriter (GCS) support for SFTP Streaming (#52850)``
|
38
|
+
|
39
|
+
Misc
|
40
|
+
~~~~
|
41
|
+
|
42
|
+
* ``Add Python 3.13 support for Airflow. (#46891)``
|
43
|
+
* ``Cleanup type ignores in sftp provider where possible (#53266)``
|
44
|
+
* ``Remove type ignore across codebase after mypy upgrade (#53243)``
|
45
|
+
* ``Remove upper-binding for "python-requires" (#52980)``
|
46
|
+
* ``Temporarily switch to use >=,< pattern instead of '~=' (#52967)``
|
47
|
+
* ``Move all BaseHook usages to version_compat in SFTP (#52894)``
|
48
|
+
|
49
|
+
Doc-only
|
50
|
+
~~~~~~~~
|
51
|
+
|
52
|
+
* ``docs: Correct TaskFlow capitalization in documentation (#51794)``
|
53
|
+
|
54
|
+
.. Below changes are excluded from the changelog. Move them to
|
55
|
+
appropriate section above if needed. Do not delete the lines(!):
|
56
|
+
* ``Deprecate decorators from Core (#53629)``
|
57
|
+
|
30
58
|
5.3.2
|
31
59
|
.....
|
32
60
|
|
@@ -70,7 +70,9 @@ 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.3.
|
73
|
+
Release: 5.3.3
|
74
|
+
|
75
|
+
Release Date: ``|PypiReleaseDate|``
|
74
76
|
|
75
77
|
Provider package
|
76
78
|
----------------
|
@@ -94,7 +96,7 @@ The minimum Apache Airflow version supported by this provider distribution is ``
|
|
94
96
|
PIP package Version required
|
95
97
|
================================ ==================
|
96
98
|
``apache-airflow`` ``>=2.10.0``
|
97
|
-
``apache-airflow-providers-ssh`` ``>=
|
99
|
+
``apache-airflow-providers-ssh`` ``>=4.0.0``
|
98
100
|
``paramiko`` ``>=2.9.0``
|
99
101
|
``asyncssh`` ``>=2.12.0``
|
100
102
|
================================ ==================
|
@@ -126,5 +128,5 @@ Downloading official packages
|
|
126
128
|
You can download officially released packages and verify their checksums and signatures from the
|
127
129
|
`Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
|
128
130
|
|
129
|
-
* `The apache-airflow-providers-sftp 5.3.
|
130
|
-
* `The apache-airflow-providers-sftp 5.3.
|
131
|
+
* `The apache-airflow-providers-sftp 5.3.3 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.3.3.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.3.3.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.3.3.tar.gz.sha512>`__)
|
132
|
+
* `The apache-airflow-providers-sftp 5.3.3 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.3.3-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.3.3-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_sftp-5.3.3-py3-none-any.whl.sha512>`__)
|
@@ -28,7 +28,7 @@ To get more information about this sensor visit :class:`~airflow.providers.sftp.
|
|
28
28
|
:end-before: [END howto_operator_sftp_sensor]
|
29
29
|
|
30
30
|
|
31
|
-
We can also use
|
31
|
+
We can also use TaskFlow API. It takes the same arguments as the :class:`~airflow.providers.sftp.sensors.sftp.SFTPSensor` along with -
|
32
32
|
|
33
33
|
op_args (optional)
|
34
34
|
A list of positional arguments that will get unpacked when
|
@@ -22,12 +22,13 @@ 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:
|
25
|
+
source-date-epoch: 1753691894
|
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.3.3
|
31
32
|
- 5.3.2
|
32
33
|
- 5.3.1
|
33
34
|
- 5.3.0
|
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
25
25
|
|
26
26
|
[project]
|
27
27
|
name = "apache-airflow-providers-sftp"
|
28
|
-
version = "5.3.
|
28
|
+
version = "5.3.3"
|
29
29
|
description = "Provider package apache-airflow-providers-sftp for Apache Airflow"
|
30
30
|
readme = "README.rst"
|
31
31
|
authors = [
|
@@ -47,9 +47,10 @@ classifiers = [
|
|
47
47
|
"Programming Language :: Python :: 3.10",
|
48
48
|
"Programming Language :: Python :: 3.11",
|
49
49
|
"Programming Language :: Python :: 3.12",
|
50
|
+
"Programming Language :: Python :: 3.13",
|
50
51
|
"Topic :: System :: Monitoring",
|
51
52
|
]
|
52
|
-
requires-python = "
|
53
|
+
requires-python = ">=3.10"
|
53
54
|
|
54
55
|
# The dependencies should be modified in place in the generated file.
|
55
56
|
# Any change in the dependencies is preserved when the file is regenerated
|
@@ -57,7 +58,7 @@ requires-python = "~=3.10"
|
|
57
58
|
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
|
58
59
|
dependencies = [
|
59
60
|
"apache-airflow>=2.10.0",
|
60
|
-
"apache-airflow-providers-ssh>=
|
61
|
+
"apache-airflow-providers-ssh>=4.0.0",
|
61
62
|
"paramiko>=2.9.0",
|
62
63
|
"asyncssh>=2.12.0",
|
63
64
|
]
|
@@ -109,8 +110,8 @@ apache-airflow-providers-common-sql = {workspace = true}
|
|
109
110
|
apache-airflow-providers-standard = {workspace = true}
|
110
111
|
|
111
112
|
[project.urls]
|
112
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
113
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.
|
113
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3"
|
114
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-sftp/5.3.3/changelog.html"
|
114
115
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
115
116
|
"Source Code" = "https://github.com/apache/airflow"
|
116
117
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
{apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/src/airflow/__init__.py
RENAMED
@@ -14,4 +14,4 @@
|
|
14
14
|
# KIND, either express or implied. See the License for the
|
15
15
|
# specific language governing permissions and limitations
|
16
16
|
# under the License.
|
17
|
-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
17
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
@@ -14,4 +14,4 @@
|
|
14
14
|
# KIND, either express or implied. See the License for the
|
15
15
|
# specific language governing permissions and limitations
|
16
16
|
# under the License.
|
17
|
-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
17
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "5.3.
|
32
|
+
__version__ = "5.3.3"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.10.0"
|
@@ -29,19 +29,15 @@ from contextlib import contextmanager
|
|
29
29
|
from fnmatch import fnmatch
|
30
30
|
from io import BytesIO
|
31
31
|
from pathlib import Path
|
32
|
-
from typing import TYPE_CHECKING, Any
|
32
|
+
from typing import IO, TYPE_CHECKING, Any, cast
|
33
33
|
|
34
34
|
import asyncssh
|
35
35
|
from asgiref.sync import sync_to_async
|
36
36
|
|
37
37
|
from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
|
38
|
+
from airflow.providers.sftp.version_compat import BaseHook
|
38
39
|
from airflow.providers.ssh.hooks.ssh import SSHHook
|
39
40
|
|
40
|
-
try:
|
41
|
-
from airflow.sdk import BaseHook
|
42
|
-
except ImportError:
|
43
|
-
from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
|
44
|
-
|
45
41
|
if TYPE_CHECKING:
|
46
42
|
from paramiko import SSHClient
|
47
43
|
from paramiko.sftp_attr import SFTPAttributes
|
@@ -293,9 +289,25 @@ class SFTPHook(SSHHook):
|
|
293
289
|
"""
|
294
290
|
with self.get_managed_conn() as conn:
|
295
291
|
if isinstance(local_full_path, BytesIO):
|
292
|
+
# It's a file-like object ( BytesIO), so use getfo().
|
293
|
+
self.log.info("Using streaming download for %s", remote_full_path)
|
296
294
|
conn.getfo(remote_full_path, local_full_path, prefetch=prefetch)
|
297
|
-
|
295
|
+
# We use hasattr checking for 'write' for cases like google.cloud.storage.fileio.BlobWriter
|
296
|
+
elif hasattr(local_full_path, "write"):
|
297
|
+
self.log.info("Using streaming download for %s", remote_full_path)
|
298
|
+
# We need to cast to pass pre-commit checks
|
299
|
+
stream_full_path = cast("IO[bytes]", local_full_path)
|
300
|
+
conn.getfo(remote_full_path, stream_full_path, prefetch=prefetch)
|
301
|
+
elif isinstance(local_full_path, (str, bytes, os.PathLike)):
|
302
|
+
# It's a string path, so use get().
|
303
|
+
self.log.info("Using standard file download for %s", remote_full_path)
|
298
304
|
conn.get(remote_full_path, local_full_path, prefetch=prefetch)
|
305
|
+
# If it's neither, it's an unsupported type.
|
306
|
+
else:
|
307
|
+
raise TypeError(
|
308
|
+
f"Unsupported type for local_full_path: {type(local_full_path)}. "
|
309
|
+
"Expected a stream-like object or a path-like object."
|
310
|
+
)
|
299
311
|
|
300
312
|
def store_file(self, remote_full_path: str, local_full_path: str, confirm: bool = True) -> None:
|
301
313
|
"""
|
@@ -743,7 +755,7 @@ class SFTPHookAsync(BaseHook):
|
|
743
755
|
if self.known_hosts.lower() == "none":
|
744
756
|
conn_config.update(known_hosts=None)
|
745
757
|
else:
|
746
|
-
conn_config.update(known_hosts=self.known_hosts)
|
758
|
+
conn_config.update(known_hosts=self.known_hosts)
|
747
759
|
if self.private_key:
|
748
760
|
_private_key = asyncssh.import_private_key(self.private_key, self.passphrase)
|
749
761
|
conn_config["client_keys"] = [_private_key]
|
@@ -33,6 +33,12 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
|
|
33
33
|
|
34
34
|
|
35
35
|
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
|
36
|
+
AIRFLOW_V_3_1_PLUS: bool = get_base_airflow_version_tuple() >= (3, 1, 0)
|
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]
|
36
42
|
|
37
43
|
if AIRFLOW_V_3_0_PLUS:
|
38
44
|
from airflow.sdk import BaseOperator, BaseSensorOperator, PokeReturnValue
|
@@ -40,4 +46,4 @@ else:
|
|
40
46
|
from airflow.models import BaseOperator
|
41
47
|
from airflow.sensors.base import BaseSensorOperator, PokeReturnValue # type: ignore[no-redef]
|
42
48
|
|
43
|
-
__all__ = ["AIRFLOW_V_3_0_PLUS", "BaseOperator", "BaseSensorOperator", "PokeReturnValue"]
|
49
|
+
__all__ = ["AIRFLOW_V_3_0_PLUS", "BaseHook", "BaseOperator", "BaseSensorOperator", "PokeReturnValue"]
|
@@ -14,4 +14,4 @@
|
|
14
14
|
# KIND, either express or implied. See the License for the
|
15
15
|
# specific language governing permissions and limitations
|
16
16
|
# under the License.
|
17
|
-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
17
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
@@ -21,7 +21,11 @@ from __future__ import annotations
|
|
21
21
|
import os
|
22
22
|
from datetime import datetime
|
23
23
|
|
24
|
-
|
24
|
+
try:
|
25
|
+
from airflow.sdk import task
|
26
|
+
except ImportError:
|
27
|
+
# Airflow 2 path
|
28
|
+
from airflow.decorators import task # type: ignore[attr-defined,no-redef]
|
25
29
|
from airflow.models import DAG
|
26
30
|
from airflow.providers.sftp.sensors.sftp import SFTPSensor
|
27
31
|
from airflow.providers.ssh.operators.ssh import SSHOperator
|
@@ -46,8 +50,8 @@ with DAG(
|
|
46
50
|
tags=["example", "sftp"],
|
47
51
|
) as dag:
|
48
52
|
# [START howto_operator_sftp_sensor_decorator]
|
49
|
-
@task.sftp_sensor(
|
50
|
-
task_id="sftp_sensor",
|
53
|
+
@task.sftp_sensor(
|
54
|
+
task_id="sftp_sensor",
|
51
55
|
path=FULL_FILE_PATH,
|
52
56
|
poke_interval=10,
|
53
57
|
)
|
{apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/unit/__init__.py
RENAMED
@@ -14,4 +14,4 @@
|
|
14
14
|
# KIND, either express or implied. See the License for the
|
15
15
|
# specific language governing permissions and limitations
|
16
16
|
# under the License.
|
17
|
-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
17
|
+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
|
@@ -20,7 +20,12 @@ from unittest.mock import patch
|
|
20
20
|
|
21
21
|
import pytest
|
22
22
|
|
23
|
-
from
|
23
|
+
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS
|
24
|
+
|
25
|
+
if AIRFLOW_V_3_0_PLUS:
|
26
|
+
from airflow.sdk import task
|
27
|
+
else:
|
28
|
+
from airflow.decorators import task # type: ignore[attr-defined,no-redef]
|
24
29
|
from airflow.utils import timezone
|
25
30
|
|
26
31
|
pytestmark = pytest.mark.db_test
|
@@ -704,7 +704,7 @@ class MockAirflowConnectionWithHostKey:
|
|
704
704
|
self.login = "username"
|
705
705
|
self.password = "password"
|
706
706
|
self.extra = f'{{ "no_host_key_check": {no_host_key_check}, "host_key": {host_key} }}'
|
707
|
-
self.extra_dejson = {
|
707
|
+
self.extra_dejson = {
|
708
708
|
"no_host_key_check": no_host_key_check,
|
709
709
|
"host_key": host_key,
|
710
710
|
"key_file": "~/keys/my_key",
|
File without changes
|
{apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/commits.rst
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/docs/security.rst
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{apache_airflow_providers_sftp-5.3.2 → apache_airflow_providers_sftp-5.3.3}/tests/conftest.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|