From: Mike Bayer Date: Mon, 20 Oct 2014 17:02:32 +0000 (-0400) Subject: - Revision files are now written out using the ``'wb'`` modifier to X-Git-Tag: rel_0_7_0~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d81619b50b9df7ff445884d84d155c01e7b2cbab;p=thirdparty%2Fsqlalchemy%2Falembic.git - Revision files are now written out using the ``'wb'`` modifier to ``open()``, since Mako reads the templates with ``'rb'``, thus preventing CRs from being doubled up as has been observed on windows. fixes #234 --- diff --git a/alembic/util.py b/alembic/util.py index b52771ba..9d48ffb9 100644 --- a/alembic/util.py +++ b/alembic/util.py @@ -58,7 +58,7 @@ except (ImportError, IOError): def template_to_file(template_file, dest, **kw): - with open(dest, 'w') as f: + with open(dest, 'wb') as f: f.write( Template(filename=template_file).render(**kw) ) diff --git a/docs/build/changelog.rst b/docs/build/changelog.rst index 0cf41dd5..5b135687 100644 --- a/docs/build/changelog.rst +++ b/docs/build/changelog.rst @@ -5,6 +5,14 @@ Changelog .. changelog:: :version: 0.7.0 + .. change:: + :tags: bug, templates + :tickets: 234 + + Revision files are now written out using the ``'wb'`` modifier to + ``open()``, since Mako reads the templates with ``'rb'``, thus preventing + CRs from being doubled up as has been observed on windows. + .. change:: :tags: bug, operations :tickets: 230