-
-
Notifications
You must be signed in to change notification settings - Fork 886
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
Add support for PostgreSQL with PyGreSQL #234
Conversation
looks good, how well do the tests run ? can you paste an output |
The dialect may be initialized without the dbapi module being loaded. Also, a connection may be made with no host argument set (localhost).
Thanks for the quick feedback. Did some manual testing and ran the standard test suite. Just noticed that the standard test suite only tests the default subdialect set as base.dialect (psycopg2 in this case). So I changed the base.dialect temporarily to pygresql, and ran the test suite again (is there a better was of testing this?). After fixing some issues (see above), the test suite now runs just was well with pygresql as with psycopg2. I have two failing tests in DistinctEngineShardTest in both cases which seem to be unrelated. Shall I create an issue for these? |
See the instructions for running the tests in README.unittests.rst. To run tests on any backend, use --dburi: The DistinctEngineShardTest is a really old set of tests that only run against sqlite. I've not seen those fail in years so just show me the failure and I can likely tell you what's going on. |
Note that it requires the latest PyGreSQL 5.0 to pass all tests, a warning is printed otherwise. Minor change to test.dialect.postgresql.test_types: - JSON content should not be required to be unicode if the dialect doesn't return unicode (Python 2). Minor change to dialects/postgresql.base: - Return index names properly casted to unicode
Ok, found the instructions and got everything working. The issue with DistinctEngineShardTest seems to be caused by running the tests on a shared folder with vagrant, due to the vboxfs filesystem. When running from a real filesystem, everything worked properly. I have run the test suite against a Postgres database with PyGreSQL 5.0 now. Test results with Python 2:
Test results with Python 3:
|
great! I'd merge this in for 1.1 which is hopefully in the spring, is that OK? (we've gone for ten years w/o a pygresql dialect so far whats another few months ? :) ) |
That's ok. A few months mean nothing to Pygres. It's already 21 years old :) |
I likely will have to accept from #172 instead because I closed this person's PR about 8 months ago. |
pygresql still inexplicably has private mailing list archives. |
Dear contributor - This pull request is being moved to Gerrit, at https://gerrit.sqlalchemy.org/36, where it may be tested and reviewed more closely. As such, the pull request itself is being marked "closed" or "declined", however your contribution is merely being moved to our central review system. Please register at https://gerrit.sqlalchemy.org#/register/ to send and receive comments regarding this item. |
Change-Id: I040b75ff3b4110e7e8b26442a4eb226ba8c26715 Pull-request: #234
a description