rusackas opened a new pull request, #43497:
URL: https://github.com/apache/superset/pull/43497
### SUMMARY
`superset/utils/pandas_sqlalchemy_compat.py` existed to work around pandas
>= 2.2 silently rejecting SQLAlchemy 1.4 engines (pandas advertises a 2.0
minimum; when it saw 1.4 it fell back to a broken sqlite-only code path).
The shim was already a no-op whenever SQLAlchemy >= 2.0 was installed, and
its own docstring says it becomes deletable "once Superset requires
SQLAlchemy >= 2."
That's now the case: `pyproject.toml` hard-requires `sqlalchemy>=2.0.52`
since #42803 (discussion #40273). Removing the shim module, its call site
in `superset/__init__.py`, and its dedicated test.
### TESTING INSTRUCTIONS
Verified pandas SQL IO still works with the shim gone:
```python
import pandas as pd
from sqlalchemy import create_engine, types
engine = create_engine("sqlite://")
df = pd.DataFrame({"name": ["a", "b"], "num": [1, 2]})
df.to_sql("t", engine, index=False, dtype={"name": types.String(255)},
method="multi", chunksize=100)
pd.read_sql_query("SELECT name, num FROM t", engine) # returns the expected
rows
```
Also ran `tests/unit_tests/utils/` — the one failure present
(`test_previous_calendar_quarter`) is pre-existing on `master` and
unrelated (confirmed by running it against an unmodified checkout).
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]