Changeset 1622:6466275a2c63


Ignore:
Timestamp:
Dec 23, 2015, 6:34:07 PM (5 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Make the paragraph on text mode semantics a warning

Move the paragraph on the different text mode semantics into the
bullet point on `FTPHost.open` and turn the paragraph into a warning
box. With this reordering, the explanations on text vs. binary mode
are finished before the explanation of the `rest` argument starts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/ftputil.txt

    r1621 r1622  
    11571157  unicode strings and write operations only accept unicode strings.
    11581158
     1159  .. warning::
     1160
     1161     Note that the semantics of "text mode" has changed fundamentally
     1162     from ftputil 2.8 and earlier. Previously, "text mode" implied
     1163     converting newline characters to ``\r\n`` when writing remote
     1164     files and converting newlines to ``\n`` when reading remote
     1165     files. This is in line with the "text mode" notion of FTP command
     1166     line clients. Now, "text mode" follows the semantics in Python's
     1167     ``io`` module.
     1168
    11591169  The arguments ``errors`` and ``newline`` have the same semantics as
    11601170  in `io.open`_. The argument ``buffering`` currently is ignored.
     
    11781188
    11791189.. _`io.open`: http://docs.python.org/library/io.html#io.open
    1180 
    1181 Note that the semantics of "text mode" has changed fundamentally from
    1182 ftputil 2.8 and earlier. Previously, "text mode" implied converting
    1183 newline characters to ``\r\n`` when writing remote files and
    1184 converting newlines to ``\n`` when reading remote files. This is
    1185 in line with the "text mode" notion of FTP command line clients.
    1186 Now, "text mode" follows the semantics in Python's ``io`` module.
    11871190
    11881191``FTPHost.open`` can also be used in a ``with`` statement::
Note: See TracChangeset for help on using the changeset viewer.