Copilot commented on code in PR #42542:
URL: https://github.com/apache/superset/pull/42542#discussion_r3667951079


##########
superset/db_engine_specs/mysql.py:
##########
@@ -183,6 +183,22 @@ class MySQLEngineSpec(BasicParametersMixin, 
BaseEngineSpec):
                     DatabaseCategory.CLOUD_AWS,
                     DatabaseCategory.HOSTED_OPEN_SOURCE,
                 ],
+                "known_incompatibilities": [
+                    {
+                        "dependency": "SQLAlchemy 2.0",
+                        "reason": (
+                            "Neither our fork 
(preset-io/sqlalchemy-aurora-data-api, "
+                            "dormant since 2021) nor the more active community 
fork "
+                            "(cloud-utils/sqlalchemy-aurora-data-api) has 
resolved "
+                            "SQLAlchemy 2.0 compatibility."
+                        ),
+                        "tracking_url": (
+                            "https://github.com/cloud-utils/";
+                            "sqlalchemy-aurora-data-api/issues/43"
+                        ),
+                        "since": "2026-07-28",
+                    }
+                ],

Review Comment:
   This Aurora Data API `known_incompatibilities` block is duplicated in both 
`mysql.py` and `postgres.py`. To reduce divergence risk when updating the 
text/URL/date, consider extracting a shared constant (e.g., in a common module 
or in `base.py`) and referencing it from both locations.



##########
superset/db_engine_specs/base.py:
##########
@@ -275,6 +275,16 @@ class CompatibleDatabase(TypedDict, total=False):
     notes: str
     docs_url: str
     categories: list[str]  # Override parent categories (e.g., for 
HOSTED_OPEN_SOURCE)
+    known_incompatibilities: list[KnownIncompatibility]
+
+
+class KnownIncompatibility(TypedDict, total=False):

Review Comment:
   `KnownIncompatibility` is referenced before it is defined. Without `from 
__future__ import annotations`, this will raise at import time when evaluating 
the annotation in `CompatibleDatabase`. Fix by moving `KnownIncompatibility` 
above `CompatibleDatabase`, or by using a forward reference (e.g., quoting 
`"KnownIncompatibility"`) / enabling postponed evaluation of annotations in 
this module.



##########
pyproject.toml:
##########
@@ -145,14 +160,27 @@ databricks = [
 datafusion = ["flightsql-dbapi>=0.2.2, <0.3"]
 db2 = ["ibm-db-sa<=0.4.4, >=0.4.4"]
 denodo = ["denodo-sqlalchemy>=2.0.5,<2.1.0"]
-dremio = ["sqlalchemy-dremio>=1.2.1, <4"]
-drill = ["sqlalchemy-drill>=1.1.10, <2"]
+# sqlalchemy-dremio 3.0.5+ hard-pins sqlalchemy~=2.0.41, dropping 1.4; 3.0.4
+# is the last dual-compat release. Capped below 3.0.5 for now; widen back to
+# <4 in lockstep with Superset's own SQLAlchemy 2.0 core bump (discussion
+# #40273), not before.
+dremio = ["sqlalchemy-dremio>=1.2.1, <3.0.5"]
+# <2 was an artificial ceiling; upstream has no SQLAlchemy version cap and
+# 1.1.10 already supports SQLAlchemy 2.0 (added `import_dbapi` in 1.1.7).
+drill = ["sqlalchemy-drill>=1.1.10, <3"]
 druid = ["pydruid>=0.6.5,<0.7"]
 duckdb = ["duckdb>=1.5.4,<2", "duckdb-engine>=0.17.0"]
 dynamodb = ["pydynamodb>=0.8.2"]
+# Effectively unmaintained (only dependabot bumps since 2024); hard-pinned to
+# SQLAlchemy ~1.4.7 upstream, no SQLAlchemy 2.0 work. See
+# superset/db_engine_specs/solr.py's known_incompatibilities metadata.
 solr = ["sqlalchemy-solr >= 0.2.4.3"]

Review Comment:
   The requirement string `"sqlalchemy-solr >= 0.2.4.3"` is likely not PEP 
508–compliant due to the spaces around the version specifier, and can cause 
`packaging.requirements.Requirement` parsing failures depending on the 
installer/tooling. Remove the spaces (e.g., `"sqlalchemy-solr>=0.2.4.3"`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to