1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #8149 -- Made File.__iter__() support universal newlines.

The following are recognized as ending a line: the Unix end-of-line
convention '\n', the Windows convention '\r\n', and the old
Macintosh convention '\r'.

http://www.python.org/dev/peps/pep-0278

Thanks tchaumeny for review.
This commit is contained in:
Jon Dufresne
2014-09-29 18:24:33 -07:00
committed by Tim Graham
parent eab3dc195e
commit eb4f6de980
5 changed files with 108 additions and 12 deletions

View File

@@ -659,6 +659,13 @@ Miscellaneous
* By default, :ref:`call_command <call-command>` now always skips the check
framework (unless you pass it ``skip_checks=False``).
* When iterating over lines, :class:`~django.core.files.File` now uses
`universal newlines`_. The following are recognized as ending a line: the
Unix end-of-line convention ``'\n'``, the Windows convention ``'\r\n'``, and
the old Macintosh convention ``'\r'``.
.. _universal newlines: http://www.python.org/dev/peps/pep-0278
.. _deprecated-features-1.8:
Features deprecated in 1.8