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

Fix the Unicode issue for all connection code paths #52

Merged
merged 1 commit into from
Oct 12, 2016

Conversation

allenpc
Copy link
Contributor

@allenpc allenpc commented May 16, 2016

Ran into the issue that was supposed to be resolved by #49, but it didn't work. Dug into it a little more and it looks like the text_factory property was getting set on the sqlalchemy connection rather than the raw, sqlite connection.
#49 also missed the code path where persist=True, since that connection is set up elsewhere.

Updated the code to use a connection listener (only for sqlite...have not tested the postgres use case, so just avoiding it to prevent issues) to make sure that text_factory is set no matter where the connection is made.

Tried to verify that the tests still pass, but was already getting a lot of failures before my change, all of this nature:

E   AttributeError: 'tuple' object has no attribute 'filename'

a6b7ac4 does not seem
to set the text_factory property on the correct object, nor
is it comprehensive for all code paths.
@glamp glamp merged commit 31ffc61 into yhat:master Oct 12, 2016
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.

2 participants