]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Fixes stdout --sql output in python2
authorJavier Santacruz <javier.santacruz.lc@gmail.com>
Thu, 17 Oct 2013 15:24:28 +0000 (17:24 +0200)
committerJavier Santacruz <javier.santacruz.lc@gmail.com>
Thu, 17 Oct 2013 15:24:28 +0000 (17:24 +0200)
commit227f1404a4012c52f75b270f237c6c6bc0579cc3
tree7a936083c8b84b97c0690e049d6da97076761f18
parentc84e3f1fd76a9fa7d8ee6221a21b7ed9188ba2f3
Fixes stdout --sql output in python2

When output_encoding is set, wraps the output buffer into a io.TextIOWrapper class
This means that the output_buffer has to be a io.IOBase instance
in order to work along with the TextIOWrapper

Handles wrapping when the buffer is Python2 stdtout, which has 'file' type
Adds test for this situation
alembic/compat.py
alembic/migration.py
tests/test_offline_environment.py