apache-airflow-providers-mysql 6.0.0rc1__tar.gz → 6.1.0rc1__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 (15) hide show
  1. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1}/PKG-INFO +11 -28
  2. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1}/README.rst +4 -22
  3. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1}/pyproject.toml +37 -26
  4. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/LICENSE +0 -52
  5. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/__init__.py +1 -1
  6. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/get_provider_info.py +19 -12
  7. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/hooks/mysql.py +1 -1
  8. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/transfers/presto_to_mysql.py +5 -1
  9. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/transfers/s3_to_mysql.py +5 -1
  10. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/transfers/trino_to_mysql.py +5 -1
  11. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/transfers/vertica_to_mysql.py +5 -1
  12. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/assets/__init__.py +0 -0
  13. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/assets/mysql.py +0 -0
  14. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/hooks/__init__.py +0 -0
  15. {apache_airflow_providers_mysql-6.0.0rc1 → apache_airflow_providers_mysql-6.1.0rc1/src}/airflow/providers/mysql/transfers/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: apache-airflow-providers-mysql
3
- Version: 6.0.0rc1
3
+ Version: 6.1.0rc1
4
4
  Summary: Provider package apache-airflow-providers-mysql for Apache Airflow
5
5
  Keywords: airflow-provider,mysql,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
@@ -20,19 +20,19 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: aiomysql>=0.2.0
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc0
25
23
  Requires-Dist: apache-airflow>=2.9.0rc0
26
- Requires-Dist: mysql-connector-python>=8.0.29
24
+ Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc0
27
25
  Requires-Dist: mysqlclient>=1.4.0; sys_platform != 'darwin'
26
+ Requires-Dist: mysql-connector-python>=8.0.29
27
+ Requires-Dist: aiomysql>=0.2.0
28
28
  Requires-Dist: apache-airflow-providers-amazon ; extra == "amazon"
29
29
  Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
30
30
  Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
31
31
  Requires-Dist: apache-airflow-providers-trino ; extra == "trino"
32
32
  Requires-Dist: apache-airflow-providers-vertica ; extra == "vertica"
33
33
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
34
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0/changelog.html
35
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0
34
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0/changelog.html
35
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0
36
36
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
37
37
  Project-URL: Source Code, https://github.com/apache/airflow
38
38
  Project-URL: Twitter, https://x.com/ApacheAirflow
@@ -45,23 +45,6 @@ Provides-Extra: trino
45
45
  Provides-Extra: vertica
46
46
 
47
47
 
48
- .. Licensed to the Apache Software Foundation (ASF) under one
49
- or more contributor license agreements. See the NOTICE file
50
- distributed with this work for additional information
51
- regarding copyright ownership. The ASF licenses this file
52
- to you under the Apache License, Version 2.0 (the
53
- "License"); you may not use this file except in compliance
54
- with the License. You may obtain a copy of the License at
55
-
56
- .. http://www.apache.org/licenses/LICENSE-2.0
57
-
58
- .. Unless required by applicable law or agreed to in writing,
59
- software distributed under the License is distributed on an
60
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
61
- KIND, either express or implied. See the License for the
62
- specific language governing permissions and limitations
63
- under the License.
64
-
65
48
  .. Licensed to the Apache Software Foundation (ASF) under one
66
49
  or more contributor license agreements. See the NOTICE file
67
50
  distributed with this work for additional information
@@ -79,8 +62,7 @@ Provides-Extra: vertica
79
62
  specific language governing permissions and limitations
80
63
  under the License.
81
64
 
82
- .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
83
- OVERWRITTEN WHEN PREPARING PACKAGES.
65
+ .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
84
66
 
85
67
  .. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
86
68
  `PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
@@ -88,7 +70,7 @@ Provides-Extra: vertica
88
70
 
89
71
  Package ``apache-airflow-providers-mysql``
90
72
 
91
- Release: ``6.0.0.rc1``
73
+ Release: ``6.1.0``
92
74
 
93
75
 
94
76
  `MySQL <https://www.mysql.com/>`__
@@ -101,7 +83,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
101
83
  are in ``airflow.providers.mysql`` python package.
102
84
 
103
85
  You can find package information and changelog for the provider
104
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0/>`_.
86
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0/>`_.
105
87
 
106
88
  Installation
107
89
  ------------
@@ -150,4 +132,5 @@ Dependent package
150
132
  ============================================================================================================== ===============
151
133
 
152
134
  The changelog for the provider package can be found in the
153
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0/changelog.html>`_.
135
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0/changelog.html>`_.
136
+
@@ -1,21 +1,4 @@
1
1
 
2
- .. Licensed to the Apache Software Foundation (ASF) under one
3
- or more contributor license agreements. See the NOTICE file
4
- distributed with this work for additional information
5
- regarding copyright ownership. The ASF licenses this file
6
- to you under the Apache License, Version 2.0 (the
7
- "License"); you may not use this file except in compliance
8
- with the License. You may obtain a copy of the License at
9
-
10
- .. http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- .. Unless required by applicable law or agreed to in writing,
13
- software distributed under the License is distributed on an
14
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- KIND, either express or implied. See the License for the
16
- specific language governing permissions and limitations
17
- under the License.
18
-
19
2
  .. Licensed to the Apache Software Foundation (ASF) under one
20
3
  or more contributor license agreements. See the NOTICE file
21
4
  distributed with this work for additional information
@@ -33,8 +16,7 @@
33
16
  specific language governing permissions and limitations
34
17
  under the License.
35
18
 
36
- .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
37
- OVERWRITTEN WHEN PREPARING PACKAGES.
19
+ .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
38
20
 
39
21
  .. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
40
22
  `PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
@@ -42,7 +24,7 @@
42
24
 
43
25
  Package ``apache-airflow-providers-mysql``
44
26
 
45
- Release: ``6.0.0.rc1``
27
+ Release: ``6.1.0``
46
28
 
47
29
 
48
30
  `MySQL <https://www.mysql.com/>`__
@@ -55,7 +37,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
55
37
  are in ``airflow.providers.mysql`` python package.
56
38
 
57
39
  You can find package information and changelog for the provider
58
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0/>`_.
40
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0/>`_.
59
41
 
60
42
  Installation
61
43
  ------------
@@ -104,4 +86,4 @@ Dependent package
104
86
  ============================================================================================================== ===============
105
87
 
106
88
  The changelog for the provider package can be found in the
107
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0/changelog.html>`_.
89
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0/changelog.html>`_.
@@ -1,4 +1,3 @@
1
-
2
1
  # Licensed to the Apache Software Foundation (ASF) under one
3
2
  # or more contributor license agreements. See the NOTICE file
4
3
  # distributed with this work for additional information
@@ -16,10 +15,9 @@
16
15
  # specific language governing permissions and limitations
17
16
  # under the License.
18
17
 
19
- # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
20
- # OVERWRITTEN WHEN PREPARING PACKAGES.
18
+ # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
21
19
 
22
- # IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
20
+ # IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
23
21
  # `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
24
22
  [build-system]
25
23
  requires = ["flit_core==3.10.1"]
@@ -27,7 +25,7 @@ build-backend = "flit_core.buildapi"
27
25
 
28
26
  [project]
29
27
  name = "apache-airflow-providers-mysql"
30
- version = "6.0.0.rc1"
28
+ version = "6.1.0.rc1"
31
29
  description = "Provider package apache-airflow-providers-mysql for Apache Airflow"
32
30
  readme = "README.rst"
33
31
  authors = [
@@ -53,43 +51,56 @@ classifiers = [
53
51
  "Topic :: System :: Monitoring",
54
52
  ]
55
53
  requires-python = "~=3.9"
54
+
55
+ # The dependencies should be modified in place in the generated file
56
+ # Any change in the dependencies is preserved when the file is regenerated
56
57
  dependencies = [
57
- "aiomysql>=0.2.0",
58
- "apache-airflow-providers-common-sql>=1.20.0rc0",
59
58
  "apache-airflow>=2.9.0rc0",
60
- "mysql-connector-python>=8.0.29",
59
+ "apache-airflow-providers-common-sql>=1.20.0rc0",
60
+ # The mysqlclient package creates friction when installing on MacOS as it needs pkg-config to
61
+ # Install and compile, and it's really only used by MySQL provider, so we can skip it on MacOS
62
+ # Instead, if someone attempts to use it on MacOS, they will get explanatory error on how to install it
61
63
  "mysqlclient>=1.4.0; sys_platform != 'darwin'",
64
+ "mysql-connector-python>=8.0.29",
65
+ "aiomysql>=0.2.0",
62
66
  ]
63
67
 
64
- [project.urls]
65
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0"
66
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.0.0/changelog.html"
67
- "Bug Tracker" = "https://github.com/apache/airflow/issues"
68
- "Source Code" = "https://github.com/apache/airflow"
69
- "Slack Chat" = "https://s.apache.org/airflow-slack"
70
- "Twitter" = "https://x.com/ApacheAirflow"
71
- "YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"
72
-
73
- [project.entry-points."apache_airflow_provider"]
74
- provider_info = "airflow.providers.mysql.get_provider_info:get_provider_info"
68
+ # The optional dependencies should be modified in place in the generated file
69
+ # Any change in the dependencies is preserved when the file is regenerated
75
70
  [project.optional-dependencies]
71
+ # only needed for backwards compatibility
72
+ "mysql-connector-python" = [
73
+ ]
76
74
  "amazon" = [
77
- "apache-airflow-providers-amazon",
75
+ "apache-airflow-providers-amazon"
78
76
  ]
79
77
  "openlineage" = [
80
- "apache-airflow-providers-openlineage",
78
+ "apache-airflow-providers-openlineage"
81
79
  ]
82
80
  "presto" = [
83
- "apache-airflow-providers-presto",
81
+ "apache-airflow-providers-presto"
84
82
  ]
85
83
  "trino" = [
86
- "apache-airflow-providers-trino",
84
+ "apache-airflow-providers-trino"
87
85
  ]
88
86
  "vertica" = [
89
- "apache-airflow-providers-vertica",
90
- ]
91
- "mysql-connector-python" = [
87
+ "apache-airflow-providers-vertica"
92
88
  ]
93
89
 
90
+ [project.urls]
91
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0"
92
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.1.0/changelog.html"
93
+ "Bug Tracker" = "https://github.com/apache/airflow/issues"
94
+ "Source Code" = "https://github.com/apache/airflow"
95
+ "Slack Chat" = "https://s.apache.org/airflow-slack"
96
+ "Twitter" = "https://x.com/ApacheAirflow"
97
+ "YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"
98
+
99
+ [project.entry-points."apache_airflow_provider"]
100
+ provider_info = "airflow.providers.mysql.get_provider_info:get_provider_info"
101
+
94
102
  [tool.flit.module]
95
103
  name = "airflow.providers.mysql"
104
+
105
+ [tool.pytest.ini_options]
106
+ ignore = "tests/system/"
@@ -199,55 +199,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
201
  limitations under the License.
202
-
203
- ============================================================================
204
- APACHE AIRFLOW SUBCOMPONENTS:
205
-
206
- The Apache Airflow project contains subcomponents with separate copyright
207
- notices and license terms. Your use of the source code for the these
208
- subcomponents is subject to the terms and conditions of the following
209
- licenses.
210
-
211
-
212
- ========================================================================
213
- Third party Apache 2.0 licenses
214
- ========================================================================
215
-
216
- The following components are provided under the Apache 2.0 License.
217
- See project link for details. The text of each license is also included
218
- at 3rd-party-licenses/LICENSE-[project].txt.
219
-
220
- (ALv2 License) hue v4.3.0 (https://github.com/cloudera/hue/)
221
- (ALv2 License) jqclock v2.3.0 (https://github.com/JohnRDOrazio/jQuery-Clock-Plugin)
222
- (ALv2 License) bootstrap3-typeahead v4.0.2 (https://github.com/bassjobsen/Bootstrap-3-Typeahead)
223
- (ALv2 License) connexion v2.7.0 (https://github.com/zalando/connexion)
224
-
225
- ========================================================================
226
- MIT licenses
227
- ========================================================================
228
-
229
- The following components are provided under the MIT License. See project link for details.
230
- The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
231
-
232
- (MIT License) jquery v3.5.1 (https://jquery.org/license/)
233
- (MIT License) dagre-d3 v0.6.4 (https://github.com/cpettitt/dagre-d3)
234
- (MIT License) bootstrap v3.4.1 (https://github.com/twbs/bootstrap/)
235
- (MIT License) d3-tip v0.9.1 (https://github.com/Caged/d3-tip)
236
- (MIT License) dataTables v1.10.25 (https://datatables.net)
237
- (MIT License) normalize.css v3.0.2 (http://necolas.github.io/normalize.css/)
238
- (MIT License) ElasticMock v1.3.2 (https://github.com/vrcmarcos/elasticmock)
239
- (MIT License) MomentJS v2.24.0 (http://momentjs.com/)
240
- (MIT License) eonasdan-bootstrap-datetimepicker v4.17.49 (https://github.com/eonasdan/bootstrap-datetimepicker/)
241
-
242
- ========================================================================
243
- BSD 3-Clause licenses
244
- ========================================================================
245
- The following components are provided under the BSD 3-Clause license. See project links for details.
246
- The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
247
-
248
- (BSD 3 License) d3 v5.16.0 (https://d3js.org)
249
- (BSD 3 License) d3-shape v2.1.0 (https://github.com/d3/d3-shape)
250
- (BSD 3 License) cgroupspy 0.2.1 (https://github.com/cloudsigma/cgroupspy)
251
-
252
- ========================================================================
253
- See 3rd-party-licenses/LICENSES-ui.txt for packages used in `/airflow/www`
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "6.0.0"
32
+ __version__ = "6.1.0"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.9.0"
@@ -15,8 +15,7 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
19
- # OVERWRITTEN WHEN PREPARING PACKAGES.
18
+ # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
20
19
  #
21
20
  # IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
22
21
  # `get_provider_info_TEMPLATE.py.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
@@ -28,8 +27,9 @@ def get_provider_info():
28
27
  "name": "MySQL",
29
28
  "description": "`MySQL <https://www.mysql.com/>`__\n",
30
29
  "state": "ready",
31
- "source-date-epoch": 1734535570,
30
+ "source-date-epoch": 1739963874,
32
31
  "versions": [
32
+ "6.1.0",
33
33
  "6.0.0",
34
34
  "5.7.4",
35
35
  "5.7.3",
@@ -74,20 +74,12 @@ def get_provider_info():
74
74
  "1.0.1",
75
75
  "1.0.0",
76
76
  ],
77
- "dependencies": [
78
- "apache-airflow>=2.9.0",
79
- "apache-airflow-providers-common-sql>=1.20.0",
80
- "mysqlclient>=1.4.0; sys_platform != 'darwin'",
81
- "mysql-connector-python>=8.0.29",
82
- "aiomysql>=0.2.0",
83
- ],
84
- "additional-extras": [{"name": "mysql-connector-python", "dependencies": []}],
85
77
  "integrations": [
86
78
  {
87
79
  "integration-name": "MySQL",
88
80
  "external-doc-url": "https://www.mysql.com/",
89
81
  "how-to-guide": ["/docs/apache-airflow-providers-mysql/operators.rst"],
90
- "logo": "/integration-logos/mysql/MySQL.png",
82
+ "logo": "/docs/integration-logos/MySQL.png",
91
83
  "tags": ["software"],
92
84
  }
93
85
  ],
@@ -123,4 +115,19 @@ def get_provider_info():
123
115
  "dataset-uris": [
124
116
  {"schemes": ["mysql", "mariadb"], "handler": "airflow.providers.mysql.assets.mysql.sanitize_uri"}
125
117
  ],
118
+ "dependencies": [
119
+ "apache-airflow>=2.9.0",
120
+ "apache-airflow-providers-common-sql>=1.20.0",
121
+ "mysqlclient>=1.4.0; sys_platform != 'darwin'",
122
+ "mysql-connector-python>=8.0.29",
123
+ "aiomysql>=0.2.0",
124
+ ],
125
+ "optional-dependencies": {
126
+ "mysql-connector-python": [],
127
+ "amazon": ["apache-airflow-providers-amazon"],
128
+ "openlineage": ["apache-airflow-providers-openlineage"],
129
+ "presto": ["apache-airflow-providers-presto"],
130
+ "trino": ["apache-airflow-providers-trino"],
131
+ "vertica": ["apache-airflow-providers-vertica"],
132
+ },
126
133
  }
@@ -78,7 +78,7 @@ class MySqlHook(DbApiHook):
78
78
  supports_autocommit = True
79
79
 
80
80
  def __init__(self, *args, **kwargs) -> None:
81
- super().__init__(*args, **kwargs)
81
+ super().__init__(*args, **{**kwargs, **{"escape_word_format": "`{}`"}})
82
82
  self.schema = kwargs.pop("schema", None)
83
83
  self.local_infile = kwargs.pop("local_infile", False)
84
84
  self.init_command = kwargs.pop("init_command", None)
@@ -25,7 +25,11 @@ from airflow.providers.mysql.hooks.mysql import MySqlHook
25
25
  from airflow.providers.presto.hooks.presto import PrestoHook
26
26
 
27
27
  if TYPE_CHECKING:
28
- from airflow.utils.context import Context
28
+ try:
29
+ from airflow.sdk.definitions.context import Context
30
+ except ImportError:
31
+ # TODO: Remove once provider drops support for Airflow 2
32
+ from airflow.utils.context import Context
29
33
 
30
34
 
31
35
  class PrestoToMySqlOperator(BaseOperator):
@@ -25,7 +25,11 @@ from airflow.providers.amazon.aws.hooks.s3 import S3Hook
25
25
  from airflow.providers.mysql.hooks.mysql import MySqlHook
26
26
 
27
27
  if TYPE_CHECKING:
28
- from airflow.utils.context import Context
28
+ try:
29
+ from airflow.sdk.definitions.context import Context
30
+ except ImportError:
31
+ # TODO: Remove once provider drops support for Airflow 2
32
+ from airflow.utils.context import Context
29
33
 
30
34
 
31
35
  class S3ToMySqlOperator(BaseOperator):
@@ -25,7 +25,11 @@ from airflow.providers.mysql.hooks.mysql import MySqlHook
25
25
  from airflow.providers.trino.hooks.trino import TrinoHook
26
26
 
27
27
  if TYPE_CHECKING:
28
- from airflow.utils.context import Context
28
+ try:
29
+ from airflow.sdk.definitions.context import Context
30
+ except ImportError:
31
+ # TODO: Remove once provider drops support for Airflow 2
32
+ from airflow.utils.context import Context
29
33
 
30
34
 
31
35
  class TrinoToMySqlOperator(BaseOperator):
@@ -38,7 +38,11 @@ from airflow.providers.mysql.hooks.mysql import MySqlHook
38
38
  from airflow.providers.vertica.hooks.vertica import VerticaHook
39
39
 
40
40
  if TYPE_CHECKING:
41
- from airflow.utils.context import Context
41
+ try:
42
+ from airflow.sdk.definitions.context import Context
43
+ except ImportError:
44
+ # TODO: Remove once provider drops support for Airflow 2
45
+ from airflow.utils.context import Context
42
46
 
43
47
 
44
48
  class VerticaToMySqlOperator(BaseOperator):