]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- Revision files are now written out using the ``'wb'`` modifier to
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Oct 2014 17:02:32 +0000 (13:02 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Oct 2014 17:02:32 +0000 (13:02 -0400)
``open()``, since Mako reads the templates with ``'rb'``, thus preventing
CRs from being doubled up as has been observed on windows.
fixes #234

alembic/util.py
docs/build/changelog.rst

index b52771ba4474a50e534dd71b15942bcd3003b159..9d48ffb96bdfc8c408c5b36d39cfdc11f516e1cc 100644 (file)
@@ -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)
         )
index 0cf41dd5e3327e6fd5d3ae494bfb5a635bc3c61a..5b135687b1e153a06f41b9b9983719f52d480d4c 100644 (file)
@@ -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