This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 6e9757b54d0 Cap pymysql<1.2 in PyPI constraints generation (#67491)
6e9757b54d0 is described below
commit 6e9757b54d05bb395dee78a0b3c57bed8b7771ed
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon May 25 22:06:40 2026 +0200
Cap pymysql<1.2 in PyPI constraints generation (#67491)
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).
---
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 71210c522e8..610152a6e0b 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(