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

Use SQLAlchemy on newer pandas versions #109

Closed
wants to merge 16 commits into from
Closed

Conversation

kjordahl
Copy link
Member

Uses SQLAlchemy if running on pandas 0.14 or later, otherwise the DB API for connecting to postGIS.

Closes #98.

@@ -27,12 +25,13 @@ def test_read_postgis_default(self):
sql = "SELECT * FROM nybb;"
df = read_postgis(sql, con)
finally:
if PANDAS_NEW_SQL_API:
# It's not really a connection, it's an engine
con = con.connect()
Copy link
Member Author

Choose a reason for hiding this comment

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

This repeated logic is horrible.

@jwass
Copy link
Member

jwass commented Jul 12, 2014

This might help: travis-ci/travis-ci#2401
libgdal-dev still causes some errors on Travis even after their fix.

@kjordahl
Copy link
Member Author

@jwass Thanks, I've tried every permutation I can think of, no luck with libgdal-dev on Travis. Perhaps there's some other ppa that plays nice with gdal versions. I don't really want to compile gdal for every test build, either. But maybe this will just get fixed in ubuntugis-unstable?

Aside: having a Travis-equivalent VM locally would be nice.

@kjordahl
Copy link
Member Author

Totally messed up the history here, closing in favor of #123.

@kjordahl kjordahl closed this Jul 12, 2014
@kjordahl kjordahl deleted the bug/pandas-sqlalchemy branch April 29, 2015 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pandas SQL API change breaks read_postgis()
2 participants