Skip to content

Commit

Permalink
- Revision files are now written out using the 'wb' modifier to
Browse files Browse the repository at this point in the history
``open()``, since Mako reads the templates with ``'rb'``, thus preventing
CRs from being doubled up as has been observed on windows.
fixes #234
  • Loading branch information
zzzeek committed Oct 20, 2014
1 parent ac95bad commit d81619b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion alembic/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _safe_int(value):


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)
)
Expand Down
8 changes: 8 additions & 0 deletions docs/build/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d81619b

Please sign in to comment.