apache-airflow-providers-mysql 6.3.1rc1__tar.gz → 6.3.2rc1__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 (46) hide show
  1. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/PKG-INFO +8 -9
  2. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/README.rst +4 -4
  3. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/changelog.rst +14 -0
  4. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/index.rst +3 -3
  5. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/provider.yaml +2 -1
  6. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/pyproject.toml +4 -5
  7. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/__init__.py +1 -1
  8. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/hooks/mysql.py +2 -2
  9. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/transfers/presto_to_mysql.py +1 -1
  10. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/transfers/s3_to_mysql.py +1 -1
  11. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/transfers/trino_to_mysql.py +1 -1
  12. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/transfers/vertica_to_mysql.py +1 -1
  13. apache_airflow_providers_mysql-6.3.2rc1/src/airflow/providers/mysql/version_compat.py +40 -0
  14. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/transfers/test_s3_to_mysql.py +4 -4
  15. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/transfers/test_trino_to_mysql.py +18 -13
  16. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/.latest-doc-only-change.txt +0 -0
  17. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/commits.rst +0 -0
  18. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/conf.py +0 -0
  19. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/connections/mysql.rst +0 -0
  20. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/installing-providers-from-sources.rst +0 -0
  21. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/integration-logos/MySQL.png +0 -0
  22. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/operators.rst +0 -0
  23. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/redirects.txt +0 -0
  24. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/docs/security.rst +0 -0
  25. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/__init__.py +0 -0
  26. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/__init__.py +0 -0
  27. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/LICENSE +0 -0
  28. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/assets/__init__.py +0 -0
  29. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/assets/mysql.py +0 -0
  30. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/get_provider_info.py +0 -0
  31. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/hooks/__init__.py +0 -0
  32. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/src/airflow/providers/mysql/transfers/__init__.py +0 -0
  33. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/conftest.py +0 -0
  34. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/system/__init__.py +0 -0
  35. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/system/mysql/__init__.py +0 -0
  36. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/system/mysql/example_mysql.py +0 -0
  37. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/__init__.py +0 -0
  38. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/__init__.py +0 -0
  39. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/assets/__init__.py +0 -0
  40. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/assets/test_mysql.py +0 -0
  41. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/hooks/__init__.py +0 -0
  42. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/hooks/test_mysql.py +0 -0
  43. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/hooks/test_mysql_connector_python.py +0 -0
  44. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/transfers/__init__.py +0 -0
  45. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/transfers/test_presto_to_mysql.py +0 -0
  46. {apache_airflow_providers_mysql-6.3.1rc1 → apache_airflow_providers_mysql-6.3.2rc1}/tests/unit/mysql/transfers/test_vertica_to_mysql.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-mysql
3
- Version: 6.3.1rc1
3
+ Version: 6.3.2rc1
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>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
- Requires-Python: ~=3.9
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
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: Framework :: Apache Airflow
16
16
  Classifier: Framework :: Apache Airflow :: Provider
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
@@ -31,8 +30,8 @@ Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
31
30
  Requires-Dist: apache-airflow-providers-trino ; extra == "trino"
32
31
  Requires-Dist: apache-airflow-providers-vertica ; extra == "vertica"
33
32
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
34
- Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.1/changelog.html
35
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.1
33
+ Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.2/changelog.html
34
+ Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.2
36
35
  Project-URL: Mastodon, https://fosstodon.org/@airflow
37
36
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
38
37
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -69,7 +68,7 @@ Provides-Extra: vertica
69
68
 
70
69
  Package ``apache-airflow-providers-mysql``
71
70
 
72
- Release: ``6.3.1``
71
+ Release: ``6.3.2``
73
72
 
74
73
 
75
74
  `MySQL <https://www.mysql.com/>`__
@@ -82,7 +81,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
82
81
  are in ``airflow.providers.mysql`` python package.
83
82
 
84
83
  You can find package information and changelog for the provider
85
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.1/>`_.
84
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.2/>`_.
86
85
 
87
86
  Installation
88
87
  ------------
@@ -91,7 +90,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
91
90
  for the minimum Airflow version supported) via
92
91
  ``pip install apache-airflow-providers-mysql``
93
92
 
94
- The package supports the following python versions: 3.9,3.10,3.11,3.12
93
+ The package supports the following python versions: 3.10,3.11,3.12
95
94
 
96
95
  Requirements
97
96
  ------------
@@ -131,5 +130,5 @@ Dependent package
131
130
  ============================================================================================================== ===============
132
131
 
133
132
  The changelog for the provider package can be found in the
134
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.1/changelog.html>`_.
133
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.2/changelog.html>`_.
135
134
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-mysql``
25
25
 
26
- Release: ``6.3.1``
26
+ Release: ``6.3.2``
27
27
 
28
28
 
29
29
  `MySQL <https://www.mysql.com/>`__
@@ -36,7 +36,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
36
36
  are in ``airflow.providers.mysql`` 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-mysql/6.3.1/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.2/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -45,7 +45,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
45
45
  for the minimum Airflow version supported) via
46
46
  ``pip install apache-airflow-providers-mysql``
47
47
 
48
- The package supports the following python versions: 3.9,3.10,3.11,3.12
48
+ The package supports the following python versions: 3.10,3.11,3.12
49
49
 
50
50
  Requirements
51
51
  ------------
@@ -85,4 +85,4 @@ Dependent package
85
85
  ============================================================================================================== ===============
86
86
 
87
87
  The changelog for the provider package can be found in the
88
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.1/changelog.html>`_.
88
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.2/changelog.html>`_.
@@ -26,6 +26,20 @@
26
26
  Changelog
27
27
  ---------
28
28
 
29
+ 6.3.2
30
+ .....
31
+
32
+ Misc
33
+ ~~~~
34
+
35
+ * ``Move 'BaseHook' implementation to task SDK (#51873)``
36
+ * ``Provider Migration: Update mysql for Airflow 3.0 compatibility (#52500)``
37
+ * ``Drop support for Python 3.9 (#52072)``
38
+
39
+ .. Below changes are excluded from the changelog. Move them to
40
+ appropriate section above if needed. Do not delete the lines(!):
41
+ * ``Introducing fixture to create 'Connections' without DB in provider tests (#51930)``
42
+
29
43
  6.3.1
30
44
  .....
31
45
 
@@ -77,7 +77,7 @@ apache-airflow-providers-mysql package
77
77
  `MySQL <https://www.mysql.com/>`__
78
78
 
79
79
 
80
- Release: 6.3.1
80
+ Release: 6.3.2
81
81
 
82
82
  Provider package
83
83
  ----------------
@@ -137,5 +137,5 @@ Downloading official packages
137
137
  You can download officially released packages and verify their checksums and signatures from the
138
138
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
139
139
 
140
- * `The apache-airflow-providers-mysql 6.3.1 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.1.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.1.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.1.tar.gz.sha512>`__)
141
- * `The apache-airflow-providers-mysql 6.3.1 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.1-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.1-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.1-py3-none-any.whl.sha512>`__)
140
+ * `The apache-airflow-providers-mysql 6.3.2 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.2.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.2.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.2.tar.gz.sha512>`__)
141
+ * `The apache-airflow-providers-mysql 6.3.2 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.2-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.2-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.2-py3-none-any.whl.sha512>`__)
@@ -22,12 +22,13 @@ description: |
22
22
  `MySQL <https://www.mysql.com/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1749896815
25
+ source-date-epoch: 1751473770
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
+ - 6.3.2
31
32
  - 6.3.1
32
33
  - 6.3.0
33
34
  - 6.2.2
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-mysql"
28
- version = "6.3.1rc1"
28
+ version = "6.3.2rc1"
29
29
  description = "Provider package apache-airflow-providers-mysql for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  authors = [
@@ -44,13 +44,12 @@ classifiers = [
44
44
  "Framework :: Apache Airflow",
45
45
  "Framework :: Apache Airflow :: Provider",
46
46
  "License :: OSI Approved :: Apache Software License",
47
- "Programming Language :: Python :: 3.9",
48
47
  "Programming Language :: Python :: 3.10",
49
48
  "Programming Language :: Python :: 3.11",
50
49
  "Programming Language :: Python :: 3.12",
51
50
  "Topic :: System :: Monitoring",
52
51
  ]
53
- requires-python = "~=3.9"
52
+ requires-python = "~=3.10"
54
53
 
55
54
  # The dependencies should be modified in place in the generated file.
56
55
  # Any change in the dependencies is preserved when the file is regenerated
@@ -129,8 +128,8 @@ apache-airflow-providers-common-sql = {workspace = true}
129
128
  apache-airflow-providers-standard = {workspace = true}
130
129
 
131
130
  [project.urls]
132
- "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.1"
133
- "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.1/changelog.html"
131
+ "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.2"
132
+ "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.3.2/changelog.html"
134
133
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
135
134
  "Source Code" = "https://github.com/apache/airflow"
136
135
  "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__ = "6.3.1"
32
+ __version__ = "6.3.2"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -220,7 +220,7 @@ class MySqlHook(DbApiHook):
220
220
  "installed in case you see compilation error during installation."
221
221
  )
222
222
 
223
- conn_config = self._get_conn_config_mysql_client(conn)
223
+ conn_config = self._get_conn_config_mysql_client(conn) # type: ignore[arg-type]
224
224
  return MySQLdb.connect(**conn_config)
225
225
 
226
226
  if client_name == "mysql-connector-python":
@@ -233,7 +233,7 @@ class MySqlHook(DbApiHook):
233
233
  "'mysql-connector-python'. Warning! It might cause dependency conflicts."
234
234
  )
235
235
 
236
- conn_config = self._get_conn_config_mysql_connector_python(conn)
236
+ conn_config = self._get_conn_config_mysql_connector_python(conn) # type: ignore[arg-type]
237
237
  return mysql.connector.connect(**conn_config)
238
238
 
239
239
  raise ValueError("Unknown MySQL client name provided!")
@@ -20,8 +20,8 @@ from __future__ import annotations
20
20
  from collections.abc import Sequence
21
21
  from typing import TYPE_CHECKING
22
22
 
23
- from airflow.models import BaseOperator
24
23
  from airflow.providers.mysql.hooks.mysql import MySqlHook
24
+ from airflow.providers.mysql.version_compat import BaseOperator
25
25
  from airflow.providers.presto.hooks.presto import PrestoHook
26
26
 
27
27
  if TYPE_CHECKING:
@@ -20,9 +20,9 @@ import os
20
20
  from collections.abc import Sequence
21
21
  from typing import TYPE_CHECKING
22
22
 
23
- from airflow.models import BaseOperator
24
23
  from airflow.providers.amazon.aws.hooks.s3 import S3Hook
25
24
  from airflow.providers.mysql.hooks.mysql import MySqlHook
25
+ from airflow.providers.mysql.version_compat import BaseOperator
26
26
 
27
27
  if TYPE_CHECKING:
28
28
  try:
@@ -20,8 +20,8 @@ from __future__ import annotations
20
20
  from collections.abc import Sequence
21
21
  from typing import TYPE_CHECKING
22
22
 
23
- from airflow.models import BaseOperator
24
23
  from airflow.providers.mysql.hooks.mysql import MySqlHook
24
+ from airflow.providers.mysql.version_compat import BaseOperator
25
25
  from airflow.providers.trino.hooks.trino import TrinoHook
26
26
 
27
27
  if TYPE_CHECKING:
@@ -33,8 +33,8 @@ except ImportError:
33
33
  "installed in case you see compilation error during installation."
34
34
  )
35
35
 
36
- from airflow.models import BaseOperator
37
36
  from airflow.providers.mysql.hooks.mysql import MySqlHook
37
+ from airflow.providers.mysql.version_compat import BaseOperator
38
38
  from airflow.providers.vertica.hooks.vertica import VerticaHook
39
39
 
40
40
  if TYPE_CHECKING:
@@ -0,0 +1,40 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ from __future__ import annotations
19
+
20
+
21
+ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
22
+ from packaging.version import Version
23
+
24
+ from airflow import __version__
25
+
26
+ airflow_version = Version(__version__)
27
+ return airflow_version.major, airflow_version.minor, airflow_version.micro
28
+
29
+
30
+ AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
31
+
32
+ if AIRFLOW_V_3_0_PLUS:
33
+ from airflow.sdk import BaseOperator
34
+ else:
35
+ from airflow.models import BaseOperator
36
+
37
+ __all__ = [
38
+ "AIRFLOW_V_3_0_PLUS",
39
+ "BaseOperator",
40
+ ]
@@ -23,15 +23,15 @@ from sqlalchemy import or_
23
23
 
24
24
  from airflow import models
25
25
  from airflow.providers.mysql.transfers.s3_to_mysql import S3ToMySqlOperator
26
- from airflow.utils import db
27
26
  from airflow.utils.session import create_session
28
27
 
29
28
  pytestmark = pytest.mark.db_test
30
29
 
31
30
 
32
31
  class TestS3ToMySqlTransfer:
33
- def setup_method(self):
34
- db.merge_conn(
32
+ @pytest.fixture(autouse=True)
33
+ def setup_connections(self, create_connection_without_db):
34
+ create_connection_without_db(
35
35
  models.Connection(
36
36
  conn_id="s3_test",
37
37
  conn_type="s3",
@@ -40,7 +40,7 @@ class TestS3ToMySqlTransfer:
40
40
  ' "aws_secret_access_key"}',
41
41
  )
42
42
  )
43
- db.merge_conn(
43
+ create_connection_without_db(
44
44
  models.Connection(
45
45
  conn_id="mysql_test",
46
46
  conn_type="mysql",
@@ -65,16 +65,21 @@ class TestTrinoToMySqlTransfer:
65
65
  @pytest.mark.skipif(
66
66
  "AIRFLOW_RUNALL_TESTS" not in os.environ, reason="Skipped because AIRFLOW_RUNALL_TESTS is not set"
67
67
  )
68
- def test_trino_to_mysql(self):
69
- op = TrinoToMySqlOperator(
70
- task_id="trino_to_mysql_check",
71
- sql="""
72
- SELECT name, count(*) as ccount
73
- FROM airflow.static_babynames
74
- GROUP BY name
75
- """,
76
- mysql_table="test_static_babynames",
77
- mysql_preoperator="TRUNCATE TABLE test_static_babynames;",
78
- dag=self.dag,
79
- )
80
- op.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_ti_state=True)
68
+ def test_trino_to_mysql(self, dag_maker):
69
+ with dag_maker(
70
+ dag_id="test_trino_to_mysql_transfer",
71
+ schedule=None,
72
+ start_date=DEFAULT_DATE,
73
+ ):
74
+ TrinoToMySqlOperator(
75
+ task_id="trino_to_mysql_check",
76
+ sql="""
77
+ SELECT name, count(*) as ccount
78
+ FROM airflow.static_babynames
79
+ GROUP BY name
80
+ """,
81
+ mysql_table="test_static_babynames",
82
+ mysql_preoperator="TRUNCATE TABLE test_static_babynames;",
83
+ )
84
+ dr = dag_maker.create_dagrun()
85
+ dag_maker.run_ti("trino_to_mysql_check", dr)