-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Make io.sql.execute raise TypeError on Engine or URI string. #50177
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
Conversation
@@ -51,7 +51,7 @@ dependencies: | |||
- pyxlsb=1.0.8 | |||
- s3fs=2021.08.0 | |||
- scipy=1.7.1 | |||
- sqlalchemy=1.4.16 | |||
- sqlalchemy=1.4.45 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am -1 on this. In general, we want to support versions that are up to a year old. This is the newest release and too strict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please open an issue describing the problem you are fixing?
This bug does not exist in any release of pandas. It only exists in the main branch due to a PR that I created. So this version restriction would only show up in pandas 2.0. I'm not able to open a bug report issue, because the template requires me to check that this bug exists on the latest version of pandas. I discovered the bug while I was trying to complete #48576. The |
You can open an issue without using the template at the bottom of that page. 2.0 will come out early next year, the limit is still to strict for us. We updated the minimum versions a couple of months ago. Can we revert your initial pr if this can not get fixed otherwise? |
Yep please open an issue with a reproducible example. Also please link the pr that caused this there, makes investigating easier. |
I have opened an issue: #50185 |
pandas/io/sql.py
Outdated
@@ -180,6 +178,15 @@ def execute(sql, con, params=None): | |||
------- | |||
Results Iterable | |||
""" | |||
warnings.warn( | |||
"pandas.io.sql.execute will be removed in pandas 3.0", | |||
DeprecationWarning, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to raise a FutureWarning here.
Could you remove the deprecation for now? We want to finish enforcing old deprecations before we add new ones. Would be better to separate this from the other changes here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, do you want me to leave it in the user guide, but just change it so that it doesn't imply you can pass an Engine? I've updated the PR this way, and removed the warning (or did you want me to change the warning to FutureWarning in this PR?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No removing the warning is fine, the FutureWarning comment was for the future.
I am ok with deleting it from the user guide immediately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, it is removed from the user guide now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@phofl thanks for approving. Is it ok to merge? I don't have write access. |
@mroeschke could you have a quick look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Will repurprose the referenced issue to deprecate io.sql.execute
in a follow up PR
Thanks @cdcadman |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.