-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test and fix for SA Engine repr failure(#130)
Running python 2, it apears SQLAlchemy is not fully capable to handle unicode strings as urls. While they can be passed and will be processed (correctly as far as we can tell) there are issues with 'representing' an ``Engine`` or ``sqlalchemy.engine.url.URL``. As far as we understand, their repr() call will naivly construct a str from its various components. If any of those substrings (like the URL) happens to be an unicode string, this will fail if it can not be ascii-decoded. SQLAlchemy should propably call repr(url) instead. For now, this commit just avoids the problem entirely by amending the triggering log message not to render a string representation of the created engine. A proper solution would probably be to write a custom wrapper function that handles Engine representation properly. Also, a test that triggers the origianl offending behaviour has been added, so any regression should be easier to find. Closes: #130
- Loading branch information
1 parent
6e30daf
commit 72144bc
Showing
4 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters