This is an automated email from the ASF dual-hosted git repository.

vatsrahul1001 pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 387c354bb79a74f5c80db17cf7eb40d8dce5e560
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon May 25 22:08:12 2026 +0200

    [v3-2-test] Cap pymysql<1.2 in PyPI constraints generation (#67491) (#67492)
    
    The released apache-airflow-providers-mysql on PyPI does not yet carry
    the pymysql<1.2 cap from #67467, so PyPI constraint generation picks up
    pymysql 1.2.0 and breaks SQLAlchemy's AsyncAdapt_aiomysql_connection.ping().
    Mirror the cap in the constraints script's 
additional_constraints_for_highest_resolution
    so PyPI constraints stay installable until the SQLAlchemy fix is released.
    Also extend the comment in providers/mysql/pyproject.toml to link the
    upstream tracking issue (sqlalchemy/sqlalchemy#13306).
    (cherry picked from commit 6e9757b54d05bb395dee78a0b3c57bed8b7771ed)
    
    Co-authored-by: Jarek Potiuk <[email protected]>
---
 providers/mysql/pyproject.toml                   | 4 +++-
 scripts/in_container/run_generate_constraints.py | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/providers/mysql/pyproject.toml b/providers/mysql/pyproject.toml
index ed159a68437..5f38527a3b9 100644
--- a/providers/mysql/pyproject.toml
+++ b/providers/mysql/pyproject.toml
@@ -69,7 +69,9 @@ dependencies = [
     'mysql-connector-python>=9.1.0; python_version < "3.12"',
     'mysql-connector-python>=9.1.0, !=9.7.0; python_version >= "3.12"',
     # pymysql 1.2.0 changed ping() to require reconnect as a positional arg;
-    # aiomysql is not yet compatible — cap until aiomysql releases a fix
+    # SQLAlchemy's AsyncAdapt_aiomysql_connection.ping has no default for it — 
cap
+    # until the SQLAlchemy fix is released. Tracked upstream at
+    # https://github.com/sqlalchemy/sqlalchemy/issues/13306
     "aiomysql>=0.2.0",
     "pymysql>=1.0.3,<1.2",
 ]
diff --git a/scripts/in_container/run_generate_constraints.py 
b/scripts/in_container/run_generate_constraints.py
index ca935d22c24..3b3a839d1e5 100755
--- a/scripts/in_container/run_generate_constraints.py
+++ b/scripts/in_container/run_generate_constraints.py
@@ -392,9 +392,16 @@ def generate_constraints_pypi_providers(config_params: 
ConfigParams) -> None:
     # * pyarrow>=22.0.0 on Python 3.14 — older pyarrow releases have no 
prebuilt wheels for
     #   Python 3.14 and uv falls back to building from source, which fails. 
pyarrow 22.0.0 is
     #   the first release shipping cp314 wheels.
+    # * pymysql<1.2 — pymysql 1.2.0 changed Connection.ping() to require 
`reconnect` as a
+    #   positional arg, which breaks SQLAlchemy's 
AsyncAdapt_aiomysql_connection.ping() (it
+    #   has no default for `reconnect`). The released 
apache-airflow-providers-mysql on PyPI
+    #   does not yet carry this cap, so we mirror it here so PyPI constraints 
stay installable
+    #   until the SQLAlchemy fix is released. Tracked upstream at
+    #   https://github.com/sqlalchemy/sqlalchemy/issues/13306
     #
     additional_constraints_for_highest_resolution: list[str] = [
         "pyarrow>=22.0.0; python_version >= '3.14'",
+        "pymysql>=1.0.3,<1.2",
     ]
 
     result = run_command(

Reply via email to