Skip to content
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

BUG: Do not error on other dbapi2 connections #45679

Merged

Conversation

abowden1989
Copy link
Contributor

@abowden1989 abowden1989 commented Jan 28, 2022

Do not throw an error in pandasSQL_builder when the connection is a dbapi2 connection that is not sqlite3 and sqlalchemy is not installed. Also restores the behaviour prior to #42546 when the connection is a string but sqlalchemy is not installed.

This partially addresses #45660 (it removes the requirement for sqlalchemy to be installed to use another connection object, however it does not remove the warning that such behaviour is unsupported).

Prior to #42546, other dbapi2 objects would work regardless of whether sqlalchemy was installed, without a warning - after this PR, they were not supported. Support was re-added (with a warning) in #45496 , but with an unnecessary requirement on sqlalchemy

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@abowden1989 abowden1989 force-pushed the do-not-error-on-other-dbapi2-connections branch from 12e381f to 7c0a246 Compare January 28, 2022 12:44
@abowden1989 abowden1989 changed the title Draft: Do not error on other dbapi2 connections Do not error on other dbapi2 connections Jan 28, 2022
@abowden1989 abowden1989 changed the title Do not error on other dbapi2 connections BUG: Do not error on other dbapi2 connections Jan 28, 2022
@jreback
Copy link
Contributor

jreback commented Jan 28, 2022

cc @fangchenli

@jreback jreback added the IO SQL to_sql, read_sql, read_sql_query label Jan 28, 2022
@jreback jreback added this to the 1.4.1 milestone Jan 29, 2022
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abowden1989 can you add a whatsnew note in 1.4.1 describing this change

@jrandall jrandall force-pushed the do-not-error-on-other-dbapi2-connections branch 2 times, most recently from 9eda931 to 89c4371 Compare January 31, 2022 12:27
@dob9601 dob9601 force-pushed the do-not-error-on-other-dbapi2-connections branch from 114ff4d to 0fa71e1 Compare January 31, 2022 12:35
dob9601 and others added 2 commits January 31, 2022 12:35
…quiring SQLAlchemy

Co-authored-by: Daniel O'Brien <daniel.o'brien@genomicsplc.com>
Co-authored-by: Joshua C. Randall <jcrandall@alum.mit.edu>
@jrandall
Copy link

@abowden1989 can you add a whatsnew note in 1.4.1 describing this change

@jreback a regression note has been added to the whatsnew for 1.4.1

@jreback jreback merged commit 4f0e22c into pandas-dev:main Jan 31, 2022
@jreback
Copy link
Contributor

jreback commented Jan 31, 2022

thanks @abowden1989

@jreback
Copy link
Contributor

jreback commented Jan 31, 2022

@meeseeksdev backport 1.4.x

@lumberbot-app

This comment has been minimized.

@lumberbot-app

This comment has been minimized.

@jreback
Copy link
Contributor

jreback commented Jan 31, 2022

@abowden1989 if you can follow the instructions above and push a backport PR would be great.

@simonjayhawkins
Copy link
Member

@abowden1989 if you can follow the instructions above and push a backport PR would be great.

Thanks @abowden1989 for the PR. backport done in #45754

simonjayhawkins added a commit that referenced this pull request Feb 1, 2022
…5754)

Co-authored-by: Adam Bowden <23028875+abowden1989@users.noreply.github.com>
@abowden1989
Copy link
Contributor Author

@abowden1989 if you can follow the instructions above and push a backport PR would be great.

Thanks @abowden1989 for the PR. backport done in #45754

Thanks for taking care of this @simonjayhawkins , I wasn't available the past few days so didn't have chance

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

Successfully merging this pull request may close these issues.

6 participants