Issue #23738: Merge 3.4 into 3.5

This commit is contained in:
Martin Panter 2015-09-09 01:56:53 +00:00
commit 0ff89099c7
10 changed files with 75 additions and 33 deletions

View file

@ -59,7 +59,7 @@ The :mod:`binascii` module defines the following functions:
should be at most 57 to adhere to the base64 standard.
.. function:: a2b_qp(string, header=False)
.. function:: a2b_qp(data, header=False)
Convert a block of quoted-printable data back to binary and return the binary
data. More than one line may be passed at a time. If the optional argument

View file

@ -857,9 +857,9 @@ as internal buffering of data.
:data:`os.SEEK_HOLE` or :data:`os.SEEK_DATA`.
.. function:: open(file, flags, mode=0o777, *, dir_fd=None)
.. function:: open(path, flags, mode=0o777, *, dir_fd=None)
Open the file *file* and set various flags according to *flags* and possibly
Open the file *path* and set various flags according to *flags* and possibly
its mode according to *mode*. When computing *mode*, the current umask value
is first masked out. Return the file descriptor for the newly opened file.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`.
@ -1071,10 +1071,10 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
:exc:`InterruptedError` exception (see :pep:`475` for the rationale).
.. function:: sendfile(out, in, offset, nbytes)
sendfile(out, in, offset, nbytes, headers=None, trailers=None, flags=0)
.. function:: sendfile(out, in, offset, count)
sendfile(out, in, offset, count, headers=None, trailers=None, flags=0)
Copy *nbytes* bytes from file descriptor *in* to file descriptor *out*
Copy *count* bytes from file descriptor *in* to file descriptor *out*
starting at *offset*.
Return the number of bytes sent. When EOF is reached return 0.
@ -1088,7 +1088,7 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
*trailers* are arbitrary sequences of buffers that are written before and
after the data from *in* is written. It returns the same as the first case.
On Mac OS X and FreeBSD, a value of 0 for *nbytes* specifies to send until
On Mac OS X and FreeBSD, a value of 0 for *count* specifies to send until
the end of *in* is reached.
All platforms support sockets as *out* file descriptor, and some platforms
@ -1690,10 +1690,10 @@ features:
The *dir_fd* argument.
.. function:: mknod(filename, mode=0o600, device=0, *, dir_fd=None)
.. function:: mknod(path, mode=0o600, device=0, *, dir_fd=None)
Create a filesystem node (file, device special file or named pipe) named
*filename*. *mode* specifies both the permissions to use and the type of node
*path*. *mode* specifies both the permissions to use and the type of node
to be created, being combined (bitwise OR) with one of ``stat.S_IFREG``,
``stat.S_IFCHR``, ``stat.S_IFBLK``, and ``stat.S_IFIFO`` (those constants are
available in :mod:`stat`). For ``stat.S_IFCHR`` and ``stat.S_IFBLK``,
@ -2389,9 +2389,9 @@ features:
.. versionadded:: 3.3
.. function:: symlink(source, link_name, target_is_directory=False, *, dir_fd=None)
.. function:: symlink(src, dst, target_is_directory=False, *, dir_fd=None)
Create a symbolic link pointing to *source* named *link_name*.
Create a symbolic link pointing to *src* named *dst*.
On Windows, a symlink represents either a file or a directory, and does not
morph to the target dynamically. If the target is present, the type of the
@ -2461,20 +2461,20 @@ features:
The *dir_fd* parameter.
.. function:: utime(path, times=None, *, ns=None, dir_fd=None, follow_symlinks=True)
.. function:: utime(path, times=None, *[, ns], dir_fd=None, follow_symlinks=True)
Set the access and modified times of the file specified by *path*.
:func:`utime` takes two optional parameters, *times* and *ns*.
These specify the times set on *path* and are used as follows:
- If *ns* is not ``None``,
- If *ns* is specified,
it must be a 2-tuple of the form ``(atime_ns, mtime_ns)``
where each member is an int expressing nanoseconds.
- If *times* is not ``None``,
it must be a 2-tuple of the form ``(atime, mtime)``
where each member is an int or float expressing seconds.
- If *times* and *ns* are both ``None``,
- If *times* is ``None`` and *ns* is unspecified,
this is equivalent to specifying ``ns=(atime_ns, mtime_ns)``
where both times are the current time.
@ -3023,9 +3023,10 @@ written in Python, such as a mail server's external command delivery program.
Availability: Unix.
.. function:: popen(command, mode='r', buffering=-1)
.. function:: popen(cmd, mode='r', buffering=-1)
Open a pipe to or from *command*. The return value is an open file object
Open a pipe to or from command *cmd*.
The return value is an open file object
connected to the pipe, which can be read or written depending on whether *mode*
is ``'r'`` (default) or ``'w'``. The *buffering* argument has the same meaning as
the corresponding argument to the built-in :func:`open` function. The

View file

@ -58,7 +58,7 @@ The available exception and functions in this module are:
Raises the :exc:`error` exception if any error occurs.
.. function:: compressobj(level=-1, method=DEFLATED, wbits=15, memlevel=8, strategy=Z_DEFAULT_STRATEGY[, zdict])
.. function:: compressobj(level=-1, method=DEFLATED, wbits=15, memLevel=8, strategy=Z_DEFAULT_STRATEGY[, zdict])
Returns a compression object, to be used for compressing data streams that won't
fit into memory at once.
@ -75,9 +75,9 @@ The available exception and functions in this module are:
should be an integer from ``8`` to ``15``. Higher values give better
compression, but use more memory.
*memlevel* controls the amount of memory used for internal compression state.
Valid values range from ``1`` to ``9``. Higher values using more memory,
but are faster and produce smaller output.
The *memLevel* argument controls the amount of memory used for the
internal compression state. Valid values range from ``1`` to ``9``.
Higher values use more memory, but are faster and produce smaller output.
*strategy* is used to tune the compression algorithm. Possible values are
``Z_DEFAULT_STRATEGY``, ``Z_FILTERED``, and ``Z_HUFFMAN_ONLY``.