rebenitez1802 commented on code in PR #45774:
URL: https://github.com/apache/superset/pull/45774#discussion_r4401909761


##########
superset/db_engine_specs/couchbase.py:
##########
@@ -114,6 +114,20 @@ class CouchbaseEngineSpec(BasicParametersMixin, 
BaseEngineSpec):
                 "is_recommended": True,
             },
         ],
+        "known_incompatibilities": [
+            {
+                "dependency": "SQLAlchemy 2.0",
+                "reason": (
+                    "setup.py on the couchbase-sqlalchemy main branch 
hard-pins "
+                    "sqlalchemy>=1.3.0,<2.0; pip will refuse to install it "
+                    "alongside Superset's sqlalchemy>=2.0.52,<2.1."

Review Comment:
   🟡 Medium: the reason text says "refuses to install", but pip actually 
downgrades SQLAlchemy, and it hard-codes a version range that is already out of 
date
   
   1. pip only refuses when both packages are resolved in one command. The 
usual way to add a driver is to install it into an existing Superset 
environment (`pip install couchbase-sqlalchemy` / `requirements-local.txt`). 
There, pip and uv both quietly downgrade SQLAlchemy to 1.4.54 (pip only prints 
a resolver warning after installing), and Superset breaks. So the warning 
undersells the risk.
   2. `sqlalchemy>=2.0.52,<2.1` is already wrong on this branch: 
`pyproject.toml:112` is `sqlalchemy>=2.0.55, <2.1` after #45703. It will keep 
drifting with every dependabot bump. The Kusto, Solr and Aurora entries don't 
quote Superset's own pin.
   
   The suggestion below passes `ruff check`/`ruff format --check`, 
`lint_metadata.py --strict`, and `test_couchbase.py`.
   
   ```suggestion
                       "couchbase-sqlalchemy (latest PyPI release 1.0.3, and 
its main "
                       "branch) hard-pins sqlalchemy>=1.3.0,<2.0; installing it 
into a "
                       "Superset environment downgrades SQLAlchemy to 1.4 and 
breaks "
                       "Superset."
   ```
   



-- 
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