apache-airflow-providers-mysql 6.3.5__tar.gz → 6.4.1rc1__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 (47) hide show
  1. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/NOTICE +1 -1
  2. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/PKG-INFO +10 -10
  3. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/README.rst +4 -4
  4. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/changelog.rst +34 -2
  5. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/index.rst +6 -6
  6. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/provider.yaml +3 -1
  7. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/pyproject.toml +6 -6
  8. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/__init__.py +3 -3
  9. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/hooks/mysql.py +1 -1
  10. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/hooks/test_mysql.py +4 -9
  11. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/transfers/test_s3_to_mysql.py +3 -5
  12. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/LICENSE +0 -0
  13. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/.latest-doc-only-change.txt +0 -0
  14. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/commits.rst +0 -0
  15. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/conf.py +0 -0
  16. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/connections/mysql.rst +0 -0
  17. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/installing-providers-from-sources.rst +0 -0
  18. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/integration-logos/MySQL.png +0 -0
  19. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/operators.rst +0 -0
  20. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/redirects.txt +0 -0
  21. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/docs/security.rst +0 -0
  22. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/__init__.py +0 -0
  23. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/__init__.py +0 -0
  24. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/assets/__init__.py +0 -0
  25. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/assets/mysql.py +0 -0
  26. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/get_provider_info.py +0 -0
  27. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/hooks/__init__.py +0 -0
  28. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/transfers/__init__.py +0 -0
  29. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/transfers/presto_to_mysql.py +0 -0
  30. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/transfers/s3_to_mysql.py +0 -0
  31. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/transfers/trino_to_mysql.py +0 -0
  32. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/transfers/vertica_to_mysql.py +0 -0
  33. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/src/airflow/providers/mysql/version_compat.py +0 -0
  34. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/conftest.py +0 -0
  35. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/system/__init__.py +0 -0
  36. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/system/mysql/__init__.py +0 -0
  37. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/system/mysql/example_mysql.py +0 -0
  38. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/__init__.py +0 -0
  39. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/__init__.py +0 -0
  40. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/assets/__init__.py +0 -0
  41. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/assets/test_mysql.py +0 -0
  42. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/hooks/__init__.py +0 -0
  43. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/hooks/test_mysql_connector_python.py +0 -0
  44. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/transfers/__init__.py +0 -0
  45. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/transfers/test_presto_to_mysql.py +0 -0
  46. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/transfers/test_trino_to_mysql.py +0 -0
  47. {apache_airflow_providers_mysql-6.3.5 → apache_airflow_providers_mysql-6.4.1rc1}/tests/unit/mysql/transfers/test_vertica_to_mysql.py +0 -0
@@ -1,5 +1,5 @@
1
1
  Apache Airflow
2
- Copyright 2016-2025 The Apache Software Foundation
2
+ Copyright 2016-2026 The Apache Software Foundation
3
3
 
4
4
  This product includes software developed at
5
5
  The Apache Software Foundation (http://www.apache.org/).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-mysql
3
- Version: 6.3.5
3
+ Version: 6.4.1rc1
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>
@@ -22,9 +22,9 @@ Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
23
  License-File: LICENSE
24
24
  License-File: NOTICE
25
- Requires-Dist: apache-airflow>=2.10.0
26
- Requires-Dist: apache-airflow-providers-common-compat>=1.8.0
27
- Requires-Dist: apache-airflow-providers-common-sql>=1.20.0
25
+ Requires-Dist: apache-airflow>=2.11.0rc1
26
+ Requires-Dist: apache-airflow-providers-common-compat>=1.12.0rc1
27
+ Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc1
28
28
  Requires-Dist: mysqlclient>=2.2.5; sys_platform != "darwin"
29
29
  Requires-Dist: mysql-connector-python>=9.1.0
30
30
  Requires-Dist: aiomysql>=0.2.0
@@ -34,8 +34,8 @@ Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
34
34
  Requires-Dist: apache-airflow-providers-trino ; extra == "trino"
35
35
  Requires-Dist: apache-airflow-providers-vertica ; extra == "vertica"
36
36
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
37
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.5/changelog.html
38
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.5
37
+ Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.4.1/changelog.html
38
+ Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.4.1
39
39
  Project-URL: Mastodon, https://fosstodon.org/@airflow
40
40
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
41
41
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -72,7 +72,7 @@ Provides-Extra: vertica
72
72
 
73
73
  Package ``apache-airflow-providers-mysql``
74
74
 
75
- Release: ``6.3.5``
75
+ Release: ``6.4.1``
76
76
 
77
77
 
78
78
  `MySQL <https://www.mysql.com/>`__
@@ -85,7 +85,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
85
85
  are in ``airflow.providers.mysql`` python package.
86
86
 
87
87
  You can find package information and changelog for the provider
88
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.5/>`_.
88
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.1/>`_.
89
89
 
90
90
  Installation
91
91
  ------------
@@ -102,7 +102,7 @@ Requirements
102
102
  ========================================== =====================================
103
103
  PIP package Version required
104
104
  ========================================== =====================================
105
- ``apache-airflow`` ``>=2.10.0``
105
+ ``apache-airflow`` ``>=2.11.0``
106
106
  ``apache-airflow-providers-common-compat`` ``>=1.8.0``
107
107
  ``apache-airflow-providers-common-sql`` ``>=1.20.0``
108
108
  ``mysqlclient`` ``>=2.2.5; sys_platform != "darwin"``
@@ -150,5 +150,5 @@ Extra Dependencies
150
150
  ========================== ========================================
151
151
 
152
152
  The changelog for the provider package can be found in the
153
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.5/changelog.html>`_.
153
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.1/changelog.html>`_.
154
154
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-mysql``
25
25
 
26
- Release: ``6.3.5``
26
+ Release: ``6.4.1``
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.5/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.1/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -53,7 +53,7 @@ Requirements
53
53
  ========================================== =====================================
54
54
  PIP package Version required
55
55
  ========================================== =====================================
56
- ``apache-airflow`` ``>=2.10.0``
56
+ ``apache-airflow`` ``>=2.11.0``
57
57
  ``apache-airflow-providers-common-compat`` ``>=1.8.0``
58
58
  ``apache-airflow-providers-common-sql`` ``>=1.20.0``
59
59
  ``mysqlclient`` ``>=2.2.5; sys_platform != "darwin"``
@@ -101,4 +101,4 @@ Extra Dependencies
101
101
  ========================== ========================================
102
102
 
103
103
  The changelog for the provider package can be found in the
104
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.5/changelog.html>`_.
104
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.1/changelog.html>`_.
@@ -26,6 +26,36 @@
26
26
  Changelog
27
27
  ---------
28
28
 
29
+ 6.4.1
30
+ .....
31
+
32
+ Misc
33
+ ~~~~
34
+
35
+ * ``Consume ''AirflowOptionalProviderFeatureException'' from compat sdk in providers (#60335)``
36
+ * ``New year means updated Copyright notices (#60344)``
37
+
38
+ .. Below changes are excluded from the changelog. Move them to
39
+ appropriate section above if needed. Do not delete the lines(!):
40
+ * ``Remove TaskInstance and TaskLogReader unused methods (#59922)``
41
+ * ``Refactor/sqla2 providers(celery, kubernetes, databricks, mysql) to remove SQLA query usage (#59537)``
42
+
43
+ 6.4.0
44
+ .....
45
+
46
+ .. note::
47
+ This release of provider is only available for Airflow 2.11+ as explained in the
48
+ Apache Airflow providers support policy <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#minimum-supported-version-of-airflow-for-community-managed-providers>_.
49
+
50
+ Misc
51
+ ~~~~
52
+
53
+ * ``Bump minimum Airflow version in providers to Airflow 2.11.0 (#58612)``
54
+
55
+ .. Below changes are excluded from the changelog. Move them to
56
+ appropriate section above if needed. Do not delete the lines(!):
57
+ * ``Updates to release process of providers (#58316)``
58
+
29
59
  6.3.5
30
60
  .....
31
61
 
@@ -63,7 +93,8 @@ Doc-only
63
93
  appropriate section above if needed. Do not delete the lines(!):
64
94
  * ``Switch pre-commit to prek (#54258)``
65
95
 
66
- .. Review and move the new changes to one of the sections above:
96
+ .. Below changes are excluded from the changelog. Move them to
97
+ appropriate section above if needed. Do not delete the lines(!):
67
98
  * ``Fix Airflow 2 reference in README/index of providers (#55240)``
68
99
 
69
100
  6.3.3
@@ -245,7 +276,8 @@ Misc
245
276
  appropriate section above if needed. Do not delete the lines(!):
246
277
  * ``Use Python 3.9 as target version for Ruff & Black rules (#44298)``
247
278
 
248
- .. Review and move the new changes to one of the sections above:
279
+ .. Below changes are excluded from the changelog. Move them to
280
+ appropriate section above if needed. Do not delete the lines(!):
249
281
  * ``Update path of example dags in docs (#45069)``
250
282
 
251
283
  5.7.4
@@ -77,7 +77,7 @@ apache-airflow-providers-mysql package
77
77
  `MySQL <https://www.mysql.com/>`__
78
78
 
79
79
 
80
- Release: 6.3.5
80
+ Release: 6.4.1
81
81
 
82
82
  Provider package
83
83
  ----------------
@@ -95,13 +95,13 @@ For the minimum Airflow version supported, see ``Requirements`` below.
95
95
  Requirements
96
96
  ------------
97
97
 
98
- The minimum Apache Airflow version supported by this provider distribution is ``2.10.0``.
98
+ The minimum Apache Airflow version supported by this provider distribution is ``2.11.0``.
99
99
 
100
100
  ========================================== =====================================
101
101
  PIP package Version required
102
102
  ========================================== =====================================
103
- ``apache-airflow`` ``>=2.10.0``
104
- ``apache-airflow-providers-common-compat`` ``>=1.8.0``
103
+ ``apache-airflow`` ``>=2.11.0``
104
+ ``apache-airflow-providers-common-compat`` ``>=1.12.0``
105
105
  ``apache-airflow-providers-common-sql`` ``>=1.20.0``
106
106
  ``mysqlclient`` ``>=2.2.5; sys_platform != "darwin"``
107
107
  ``mysql-connector-python`` ``>=9.1.0``
@@ -139,5 +139,5 @@ Downloading official packages
139
139
  You can download officially released packages and verify their checksums and signatures from the
140
140
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
141
141
 
142
- * `The apache-airflow-providers-mysql 6.3.5 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.5.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.5.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.5.tar.gz.sha512>`__)
143
- * `The apache-airflow-providers-mysql 6.3.5 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.5-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.5-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.3.5-py3-none-any.whl.sha512>`__)
142
+ * `The apache-airflow-providers-mysql 6.4.1 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.4.1.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.4.1.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.4.1.tar.gz.sha512>`__)
143
+ * `The apache-airflow-providers-mysql 6.4.1 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.4.1-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.4.1-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_mysql-6.4.1-py3-none-any.whl.sha512>`__)
@@ -22,12 +22,14 @@ description: |
22
22
  `MySQL <https://www.mysql.com/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1763069907
25
+ source-date-epoch: 1768335332
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.4.1
32
+ - 6.4.0
31
33
  - 6.3.5
32
34
  - 6.3.4
33
35
  - 6.3.3
@@ -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.5"
28
+ version = "6.4.1rc1"
29
29
  description = "Provider package apache-airflow-providers-mysql for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  license = "Apache-2.0"
@@ -58,9 +58,9 @@ requires-python = ">=3.10"
58
58
  # Make sure to run ``prek update-providers-dependencies --all-files``
59
59
  # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
60
60
  dependencies = [
61
- "apache-airflow>=2.10.0",
62
- "apache-airflow-providers-common-compat>=1.8.0",
63
- "apache-airflow-providers-common-sql>=1.20.0",
61
+ "apache-airflow>=2.11.0rc1",
62
+ "apache-airflow-providers-common-compat>=1.12.0rc1",
63
+ "apache-airflow-providers-common-sql>=1.20.0rc1",
64
64
  # The mysqlclient package creates friction when installing on MacOS as it needs pkg-config to
65
65
  # Install and compile, and it's really only used by MySQL provider, so we can skip it on MacOS
66
66
  # Instead, if someone attempts to use it on MacOS, they will get explanatory error on how to install it
@@ -132,8 +132,8 @@ apache-airflow-providers-common-sql = {workspace = true}
132
132
  apache-airflow-providers-standard = {workspace = true}
133
133
 
134
134
  [project.urls]
135
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.5"
136
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.5/changelog.html"
135
+ "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.4.1"
136
+ "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-mysql/6.4.1/changelog.html"
137
137
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
138
138
  "Source Code" = "https://github.com/apache/airflow"
139
139
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "6.3.5"
32
+ __version__ = "6.4.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.10.0"
35
+ "2.11.0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-mysql:{__version__}` needs Apache Airflow 2.10.0+"
38
+ f"The package `apache-airflow-providers-mysql:{__version__}` needs Apache Airflow 2.11.0+"
39
39
  )
@@ -24,7 +24,7 @@ import logging
24
24
  from typing import TYPE_CHECKING, Any, Union
25
25
  from urllib.parse import quote_plus, urlencode
26
26
 
27
- from airflow.exceptions import AirflowOptionalProviderFeatureException
27
+ from airflow.providers.common.compat.sdk import AirflowOptionalProviderFeatureException
28
28
  from airflow.providers.common.sql.hooks.sql import DbApiHook
29
29
 
30
30
  logger = logging.getLogger(__name__)
@@ -27,6 +27,10 @@ import sqlalchemy
27
27
 
28
28
  from airflow.models.dag import DAG
29
29
  from airflow.providers.common.compat.sdk import Connection
30
+ from airflow.providers.mysql.hooks.mysql import MySqlHook
31
+
32
+ from tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces
33
+ from tests_common.test_utils.compat import timezone
30
34
 
31
35
  try:
32
36
  import MySQLdb.cursors
@@ -35,15 +39,6 @@ try:
35
39
  except ImportError:
36
40
  MYSQL_AVAILABLE = False
37
41
 
38
- from airflow.providers.mysql.hooks.mysql import MySqlHook
39
-
40
- try:
41
- from airflow.sdk import timezone
42
- except ImportError:
43
- from airflow.utils import timezone # type: ignore[attr-defined,no-redef]
44
-
45
- from tests_common.test_utils.asserts import assert_equal_ignore_multiple_spaces
46
-
47
42
  SSL_DICT = {"cert": "/tmp/client-cert.pem", "ca": "/tmp/server-ca.pem", "key": "/tmp/client-key.pem"}
48
43
  INSERT_SQL_STATEMENT = "INSERT INTO connection (id, conn_id, conn_type, description, host, `schema`, login, password, port, is_encrypted, is_extra_encrypted, extra) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)"
49
44
 
@@ -19,7 +19,7 @@ from __future__ import annotations
19
19
  from unittest.mock import patch
20
20
 
21
21
  import pytest
22
- from sqlalchemy import or_
22
+ from sqlalchemy import delete, or_
23
23
 
24
24
  from airflow import models
25
25
  from airflow.providers.mysql.transfers.s3_to_mysql import S3ToMySqlOperator
@@ -101,10 +101,8 @@ class TestS3ToMySqlTransfer:
101
101
 
102
102
  def teardown_method(self):
103
103
  with create_session() as session:
104
- (
105
- session.query(models.Connection)
106
- .filter(
104
+ session.execute(
105
+ delete(models.Connection).where(
107
106
  or_(models.Connection.conn_id == "s3_test", models.Connection.conn_id == "mysql_test")
108
107
  )
109
- .delete()
110
108
  )