template_to_file turns CR+LF into CR+CR+LF on windows #234
Comments
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: easy enough, thanks! |
Sebastian Bank (@xflr6) wrote: Thanks, I was not 100% sure this works with Py3 (does Template.render() return bytes under Py3?) |
Michael Bayer (@zzzeek) wrote: it does not. |
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: (work, that is. dont know why yet) |
Sebastian Bank (@xflr6) wrote: Sadly, |
Michael Bayer (@zzzeek) wrote:
Revision files are now written out using the → fd2a172 |
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: it didn't work because render() passes out a Python unicode and then Py3k with the 'wb' just...not sure, wrote out nothing. So now we write out with 'wb' and set the encoding explicitly, defaults to utf-8, can be set with "output_encoding" in the .ini file. |
Migrated issue, originally created by Sebastian Bank (@xflr6)
Under Python 2.7, the files created by
alembic revision
have CR+CR+LF line endings.Mako opens the template with mode
rb
, while alembic usesw
producing the extra CRs.The text was updated successfully, but these errors were encountered: