-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
REGR: 1.4.0rc0: pd.read_sql not compatible with pymysql #45416
Comments
The ValueError raised was added in #42546 cc @fangchenli |
We currently only support pymysql through sqlalchemy. |
Confirming this is breaking in 1.4.0rc0 It used to work earlier (prior to the linked PR) as the |
We have documented that we only support sqlite3 for plain DBAPI2 connection objects: Lines 462 to 464 in 21b7daf
But it is true that any connection has implicitly worked up to now as long as you are just reading a query (not reading a table or writing). Given that this has worked for so long, we should probably not just change it without warning. |
Thanks @jorisvandenbossche
|
@jorisvandenbossche Is this severe enough to block 1.4.0? |
we could maybe revert #42546 for now |
Co-authored-by: Fangchen Li <fangchen.li@outlook.com>
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
the above code raises
ValueError: pandas only support SQLAlchemy connectable(engine/connection) ordatabase string URI or sqlite3 DBAPI2 connection
Expected Behavior
Is pymysql not supported anymore?
Installed Versions
INSTALLED VERSIONS
commit : d023ba7
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.8.0-63-generic
Version : #71-Ubuntu SMP Tue Jul 13 15:59:12 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0rc0
numpy : 1.20.3
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.0.4
Cython : 0.29.24
pytest : 6.2.5
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.2
html5lib : 1.1
pymysql : 1.0.2
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : 2.11.3
IPython : 7.29.0
pandas_datareader: 0.9.0
bs4 : None
bottleneck : None
fsspec : 2021.11.1
fastparquet : None
gcsfs : None
matplotlib : 3.5.0
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 6.0.1
pyxlsb : None
s3fs : None
scipy : 1.7.3
sqlalchemy : 1.4.27
tables : None
tabulate : 0.8.9
xarray : None
xlrd : None
xlwt : None
numba : 0.54.1
zstandard : None
The text was updated successfully, but these errors were encountered: