apache-airflow-providers-mysql 6.3.4__py3-none-any.whl → 6.4.0__py3-none-any.whl

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.
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "6.3.4"
32
+ __version__ = "6.4.0"
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
  )
@@ -30,12 +30,7 @@ from airflow.providers.common.sql.hooks.sql import DbApiHook
30
30
  logger = logging.getLogger(__name__)
31
31
 
32
32
  if TYPE_CHECKING:
33
- from airflow.providers.mysql.version_compat import AIRFLOW_V_3_0_PLUS
34
-
35
- if AIRFLOW_V_3_0_PLUS:
36
- from airflow.sdk import Connection
37
- else:
38
- from airflow.models.connection import Connection # type: ignore[assignment]
33
+ from airflow.providers.common.compat.sdk import Connection
39
34
 
40
35
  try:
41
36
  from mysql.connector.abstracts import MySQLConnectionAbstract
@@ -20,16 +20,12 @@ from __future__ import annotations
20
20
  from collections.abc import Sequence
21
21
  from typing import TYPE_CHECKING
22
22
 
23
+ from airflow.providers.common.compat.sdk import BaseOperator
23
24
  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:
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
28
+ from airflow.providers.common.compat.sdk import Context
33
29
 
34
30
 
35
31
  class PrestoToMySqlOperator(BaseOperator):
@@ -21,15 +21,11 @@ from collections.abc import Sequence
21
21
  from typing import TYPE_CHECKING
22
22
 
23
23
  from airflow.providers.amazon.aws.hooks.s3 import S3Hook
24
+ from airflow.providers.common.compat.sdk import BaseOperator
24
25
  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
- 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
28
+ from airflow.providers.common.compat.sdk import Context
33
29
 
34
30
 
35
31
  class S3ToMySqlOperator(BaseOperator):
@@ -20,16 +20,12 @@ from __future__ import annotations
20
20
  from collections.abc import Sequence
21
21
  from typing import TYPE_CHECKING
22
22
 
23
+ from airflow.providers.common.compat.sdk import BaseOperator
23
24
  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:
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
28
+ from airflow.providers.common.compat.sdk import Context
33
29
 
34
30
 
35
31
  class TrinoToMySqlOperator(BaseOperator):
@@ -33,16 +33,12 @@ except ImportError:
33
33
  "installed in case you see compilation error during installation."
34
34
  )
35
35
 
36
+ from airflow.providers.common.compat.sdk import BaseOperator
36
37
  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:
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
41
+ from airflow.providers.common.compat.sdk import Context
46
42
 
47
43
 
48
44
  class VerticaToMySqlOperator(BaseOperator):
@@ -149,13 +145,13 @@ class VerticaToMySqlOperator(BaseOperator):
149
145
  self._run_preoperator(mysql)
150
146
  try:
151
147
  self.log.info("Bulk inserting rows into MySQL...")
152
- with closing(mysql.get_conn()) as conn, closing(conn.cursor()) as cursor:
153
- cursor.execute(
148
+ with closing(mysql.get_conn()) as conn2, closing(conn2.cursor()) as cursor2:
149
+ cursor2.execute(
154
150
  f"LOAD DATA LOCAL INFILE '{tmpfile.name}' "
155
151
  f"INTO TABLE {self.mysql_table} "
156
152
  f"LINES TERMINATED BY '\r\n' ({', '.join(selected_columns)})"
157
153
  )
158
- conn.commit()
154
+ conn2.commit()
159
155
  self.log.info("Inserted rows into MySQL %s", count)
160
156
  except (MySQLdb.Error, MySQLdb.Warning):
161
157
  self.log.info("Inserted rows into MySQL 0")
@@ -29,12 +29,6 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
29
29
 
30
30
  AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
31
31
 
32
- if AIRFLOW_V_3_0_PLUS:
33
- from airflow.sdk import BaseOperator
34
- else:
35
- from airflow.models import BaseOperator
36
-
37
32
  __all__ = [
38
33
  "AIRFLOW_V_3_0_PLUS",
39
- "BaseOperator",
40
34
  ]
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-mysql
3
- Version: 6.3.4
3
+ Version: 6.4.0
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
8
  Requires-Python: >=3.10
9
9
  Description-Content-Type: text/x-rst
10
+ License-Expression: Apache-2.0
10
11
  Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: Environment :: Console
12
13
  Classifier: Environment :: Web Environment
@@ -14,13 +15,15 @@ Classifier: Intended Audience :: Developers
14
15
  Classifier: Intended Audience :: System Administrators
15
16
  Classifier: Framework :: Apache Airflow
16
17
  Classifier: Framework :: Apache Airflow :: Provider
17
- Classifier: License :: OSI Approved :: Apache Software License
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.10.0
23
+ License-File: LICENSE
24
+ License-File: NOTICE
25
+ Requires-Dist: apache-airflow>=2.11.0
26
+ Requires-Dist: apache-airflow-providers-common-compat>=1.8.0
24
27
  Requires-Dist: apache-airflow-providers-common-sql>=1.20.0
25
28
  Requires-Dist: mysqlclient>=2.2.5; sys_platform != "darwin"
26
29
  Requires-Dist: mysql-connector-python>=9.1.0
@@ -31,8 +34,8 @@ Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
31
34
  Requires-Dist: apache-airflow-providers-trino ; extra == "trino"
32
35
  Requires-Dist: apache-airflow-providers-vertica ; extra == "vertica"
33
36
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
34
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.4/changelog.html
35
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.4
37
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.0/changelog.html
38
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.0
36
39
  Project-URL: Mastodon, https://fosstodon.org/@airflow
37
40
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
38
41
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -69,7 +72,7 @@ Provides-Extra: vertica
69
72
 
70
73
  Package ``apache-airflow-providers-mysql``
71
74
 
72
- Release: ``6.3.4``
75
+ Release: ``6.4.0``
73
76
 
74
77
 
75
78
  `MySQL <https://www.mysql.com/>`__
@@ -82,7 +85,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
82
85
  are in ``airflow.providers.mysql`` python package.
83
86
 
84
87
  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.4/>`_.
88
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.0/>`_.
86
89
 
87
90
  Installation
88
91
  ------------
@@ -96,15 +99,16 @@ The package supports the following python versions: 3.10,3.11,3.12,3.13
96
99
  Requirements
97
100
  ------------
98
101
 
99
- ======================================= =====================================
100
- PIP package Version required
101
- ======================================= =====================================
102
- ``apache-airflow`` ``>=2.10.0``
103
- ``apache-airflow-providers-common-sql`` ``>=1.20.0``
104
- ``mysqlclient`` ``>=2.2.5; sys_platform != "darwin"``
105
- ``mysql-connector-python`` ``>=9.1.0``
106
- ``aiomysql`` ``>=0.2.0``
107
- ======================================= =====================================
102
+ ========================================== =====================================
103
+ PIP package Version required
104
+ ========================================== =====================================
105
+ ``apache-airflow`` ``>=2.11.0``
106
+ ``apache-airflow-providers-common-compat`` ``>=1.8.0``
107
+ ``apache-airflow-providers-common-sql`` ``>=1.20.0``
108
+ ``mysqlclient`` ``>=2.2.5; sys_platform != "darwin"``
109
+ ``mysql-connector-python`` ``>=9.1.0``
110
+ ``aiomysql`` ``>=0.2.0``
111
+ ========================================== =====================================
108
112
 
109
113
  Cross provider package dependencies
110
114
  -----------------------------------
@@ -119,17 +123,32 @@ You can install such cross-provider dependencies when installing from PyPI. For
119
123
  pip install apache-airflow-providers-mysql[amazon]
120
124
 
121
125
 
122
- ============================================================================================================== ===============
123
- Dependent package Extra
124
- ============================================================================================================== ===============
125
- `apache-airflow-providers-amazon <https://airflow.apache.org/docs/apache-airflow-providers-amazon>`_ ``amazon``
126
- `apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_ ``common.sql``
127
- `apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
128
- `apache-airflow-providers-presto <https://airflow.apache.org/docs/apache-airflow-providers-presto>`_ ``presto``
129
- `apache-airflow-providers-trino <https://airflow.apache.org/docs/apache-airflow-providers-trino>`_ ``trino``
130
- `apache-airflow-providers-vertica <https://airflow.apache.org/docs/apache-airflow-providers-vertica>`_ ``vertica``
131
- ============================================================================================================== ===============
126
+ ================================================================================================================== =================
127
+ Dependent package Extra
128
+ ================================================================================================================== =================
129
+ `apache-airflow-providers-amazon <https://airflow.apache.org/docs/apache-airflow-providers-amazon>`_ ``amazon``
130
+ `apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
131
+ `apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_ ``common.sql``
132
+ `apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
133
+ `apache-airflow-providers-presto <https://airflow.apache.org/docs/apache-airflow-providers-presto>`_ ``presto``
134
+ `apache-airflow-providers-trino <https://airflow.apache.org/docs/apache-airflow-providers-trino>`_ ``trino``
135
+ `apache-airflow-providers-vertica <https://airflow.apache.org/docs/apache-airflow-providers-vertica>`_ ``vertica``
136
+ ================================================================================================================== =================
137
+
138
+ Optional dependencies
139
+ ----------------------
140
+
141
+ ========================== ========================================
142
+ Extra Dependencies
143
+ ========================== ========================================
144
+ ``mysql-connector-python``
145
+ ``amazon`` ``apache-airflow-providers-amazon``
146
+ ``openlineage`` ``apache-airflow-providers-openlineage``
147
+ ``presto`` ``apache-airflow-providers-presto``
148
+ ``trino`` ``apache-airflow-providers-trino``
149
+ ``vertica`` ``apache-airflow-providers-vertica``
150
+ ========================== ========================================
132
151
 
133
152
  The changelog for the provider package can be found in the
134
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.3.4/changelog.html>`_.
153
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.4.0/changelog.html>`_.
135
154
 
@@ -0,0 +1,18 @@
1
+ airflow/providers/mysql/__init__.py,sha256=jdO0z74azI-9Vt8Ov9vy0k_DedW1nk9ORsbrKp0rDdc,1494
2
+ airflow/providers/mysql/get_provider_info.py,sha256=LNQZ8O48srWzGjS8mzLeAsa-VFGFY6ypkHK1jjr6umc,3064
3
+ airflow/providers/mysql/version_compat.py,sha256=WjmnDM48kcYw3Je7Y3y2QW72dcq1nAhuuQb0EwxKJig,1197
4
+ airflow/providers/mysql/assets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
5
+ airflow/providers/mysql/assets/mysql.py,sha256=ORHZmCa1AZAWwpF7GKH-8faqOKSohJvKtqRgfDnQRRc,1385
6
+ airflow/providers/mysql/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
7
+ airflow/providers/mysql/hooks/mysql.py,sha256=OCWC1jnAdriVLsde9Fw2BDC3lyhjHjZZgIqwZHm4bZc,16335
8
+ airflow/providers/mysql/transfers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
9
+ airflow/providers/mysql/transfers/presto_to_mysql.py,sha256=tD8IcBU9Bn-b9LC-g43QuV24Vi7ThfeLyB5HmJqp8zM,3331
10
+ airflow/providers/mysql/transfers/s3_to_mysql.py,sha256=E5Ldaj1rzhUeDKVTYo63VHAbVINcmzi1jZkUZRHTUXM,3938
11
+ airflow/providers/mysql/transfers/trino_to_mysql.py,sha256=gQapv53XpTeEOmro63nDZgN1H0qz9Ig2K5bOhaDDv6k,3313
12
+ airflow/providers/mysql/transfers/vertica_to_mysql.py,sha256=cVJqw3lncx4ZaicKjft9lR87sH-O54U-YlSgcppUDTU,6828
13
+ apache_airflow_providers_mysql-6.4.0.dist-info/entry_points.txt,sha256=kIbWluJZ1LX9jo9pLkqbnu6DUgYpoGKXzmSvjT5czKM,101
14
+ apache_airflow_providers_mysql-6.4.0.dist-info/licenses/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
15
+ apache_airflow_providers_mysql-6.4.0.dist-info/licenses/NOTICE,sha256=E3-_E02gwwSEFzeeWPKmnIjOoos3hW28CLISV6sYrbQ,168
16
+ apache_airflow_providers_mysql-6.4.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
17
+ apache_airflow_providers_mysql-6.4.0.dist-info/METADATA,sha256=IKM-W3suUdjg3ILGTHQackiNrJJjMvhQjrGOSKzyrZw,7499
18
+ apache_airflow_providers_mysql-6.4.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Apache Airflow
2
+ Copyright 2016-2025 The Apache Software Foundation
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (http://www.apache.org/).
@@ -1,17 +0,0 @@
1
- airflow/providers/mysql/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/mysql/__init__.py,sha256=V0IZ2AFAPyAcNMu5LSWUKpKAAJZ6_XM9z1u1Xngl6pg,1494
3
- airflow/providers/mysql/get_provider_info.py,sha256=LNQZ8O48srWzGjS8mzLeAsa-VFGFY6ypkHK1jjr6umc,3064
4
- airflow/providers/mysql/version_compat.py,sha256=k18iZM_Hg0KlMrY6A4-xm9PJWJ6uxnicgYkzXySF78Y,1332
5
- airflow/providers/mysql/assets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
6
- airflow/providers/mysql/assets/mysql.py,sha256=ORHZmCa1AZAWwpF7GKH-8faqOKSohJvKtqRgfDnQRRc,1385
7
- airflow/providers/mysql/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
8
- airflow/providers/mysql/hooks/mysql.py,sha256=_9EEpFHEUfs1A79bTMVdz1bK1F8bAtY0EFnSWdM5N1M,16512
9
- airflow/providers/mysql/transfers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
10
- airflow/providers/mysql/transfers/presto_to_mysql.py,sha256=44o2DMZd_vwpKeM1kRoa2q8oJxeYXy3cuylCyIf99yU,3482
11
- airflow/providers/mysql/transfers/s3_to_mysql.py,sha256=3IIrmNkDWHJ8GbTABWQ26hPJdQUinrF8NFZXMavwDaI,4089
12
- airflow/providers/mysql/transfers/trino_to_mysql.py,sha256=LVXVWFQzju7lZl-GCIevjto0ZQqKv3H8loWfDv8wcWY,3464
13
- airflow/providers/mysql/transfers/vertica_to_mysql.py,sha256=L0ZMJgqE5ULwYqhVLxc6yXUyS50rhy4lSFF9reEOkGw,6974
14
- apache_airflow_providers_mysql-6.3.4.dist-info/entry_points.txt,sha256=kIbWluJZ1LX9jo9pLkqbnu6DUgYpoGKXzmSvjT5czKM,101
15
- apache_airflow_providers_mysql-6.3.4.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
16
- apache_airflow_providers_mysql-6.3.4.dist-info/METADATA,sha256=oCcj_UDws8-KM6Ai_8tI39lUjNnpksf_MLh2k8O49qM,6517
17
- apache_airflow_providers_mysql-6.3.4.dist-info/RECORD,,