summaryrefslogtreecommitdiff
path: root/alembic/migration.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-12 20:10:56 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-12 20:10:56 -0400
commitd77b1d838d20d9b57154ce9bbb0c2e5a24c48cb0 (patch)
tree33289812bacd8693094dbcb37df18ff7bf00340d /alembic/migration.py
parent2f7b645df2a9c5d9d9601baa0ada4bd0f4c366b3 (diff)
downloadalembic-d77b1d838d20d9b57154ce9bbb0c2e5a24c48cb0.tar.gz
- will call this 0.6
- cleanup unused symbols in compat - move any remaining conditional import switches out to compat - pretty sure anything we use for a buffer will have flush() - I can see that using the new io.* stuff means codecs isn't too smooth here, but removed the double-wrap check in migration.py which seems to be due to the bytesio setup in the test suite, simplified this so that an encoding-writing test just writes to BytesIO - removed all "from __future__ import with_statement" - i think when we load_source(), that file might not be ascii so we need to open as bytes - make encoding an explcit argument in test suite write_script() - sort the columns in autogenerate so that the autogen tests run consistently on python3.3, seems to have a very random set ordering, also loosen up an ordered check in test_op
Diffstat (limited to 'alembic/migration.py')
-rw-r--r--alembic/migration.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alembic/migration.py b/alembic/migration.py
index 28ee622..cdd244a 100644
--- a/alembic/migration.py
+++ b/alembic/migration.py
@@ -72,8 +72,8 @@ class MigrationContext(object):
self._migrations_fn = opts.get('fn')
self.as_sql = as_sql
self.output_buffer = opts.get("output_buffer", sys.stdout)
- if (opts.get('output_encoding') and
- not isinstance(self.output_buffer, io.TextIOBase)):
+
+ if opts.get('output_encoding'):
self.output_buffer = io.TextIOWrapper(
self.output_buffer,
opts['output_encoding']