Skip to content

SqlAlchemy update to 2.0.39 breaks read_sql #1166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
loicdiridollou opened this issue Mar 13, 2025 · 1 comment · Fixed by #1167
Closed

SqlAlchemy update to 2.0.39 breaks read_sql #1166

loicdiridollou opened this issue Mar 13, 2025 · 1 comment · Fixed by #1167
Labels
good first issue IO SQL to_sql, read_sql, read_sql_query

Comments

@loicdiridollou
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

Poe => mypy

===========================================
Beginning: 'Run mypy on 'tests' (using the local stubs) and on the local stubs'
===========================================

tests/test_io.py:1419: error: Argument 1 to "read_sql" has incompatible type "Select[Row[tuple[int]]] | FromStatement[Row[tuple[int]]] | UpdateBase"; expected "str | Selectable | TextClause | Select[Any] | FromStatement[Any]"  [arg-type]
Found 1 error in 1 file (checked 226 source files)

Running the test suite will raise an error with the latest update of SqlAlchemy to 2.0.39.
For now I have restricted the version of the package to stop at 2.0.38, the typehint needs to be fixed.

Please complete the following information:

  • OS: all
  • OS Version [e.g. 22]
  • python version 3.10-3.12
  • version of type checker latest
  • version of installed pandas-stubs latest

Additional context
Add any other context about the problem here.

@shirzady1934
Copy link
Contributor

@loicdiridollou I have made the required changes (Update test to use SQLAlchemy 2.0 compatible select statement) . Please review and let me know if anything else is needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue IO SQL to_sql, read_sql, read_sql_query
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants