Issue #23738: Merge 3.5 into 3.6

This commit is contained in:
Martin Panter 2015-09-09 03:01:17 +00:00
commit a122b5a1fd
10 changed files with 75 additions and 33 deletions

View file

@ -4679,7 +4679,7 @@ os.utime
dir_fd: dir_fd(requires='futimensat') = None
follow_symlinks: bool=True
# "utime(path, times=None, *, ns=None, dir_fd=None, follow_symlinks=True)\n\
# "utime(path, times=None, *[, ns], dir_fd=None, follow_symlinks=True)\n\
Set the access and modified time of path.
@ -4689,10 +4689,10 @@ On some platforms, path may also be specified as an open file descriptor.
If times is not None, it must be a tuple (atime, mtime);
atime and mtime should be expressed as float seconds since the epoch.
If ns is not None, it must be a tuple (atime_ns, mtime_ns);
If ns is specified, it must be a tuple (atime_ns, mtime_ns);
atime_ns and mtime_ns should be expressed as integer nanoseconds
since the epoch.
If both times and ns are None, utime uses the current time.
If times is None and ns is unspecified, utime uses the current time.
Specifying tuples for both times and ns is an error.
If dir_fd is not None, it should be a file descriptor open to a directory,
@ -4710,7 +4710,7 @@ dir_fd and follow_symlinks may not be available on your platform.
static PyObject *
os_utime_impl(PyModuleDef *module, path_t *path, PyObject *times,
PyObject *ns, int dir_fd, int follow_symlinks)
/*[clinic end generated code: output=31f3434e560ba2f0 input=1f18c17d5941aa82]*/
/*[clinic end generated code: output=31f3434e560ba2f0 input=081cdc54ca685385]*/
{
#ifdef MS_WINDOWS
HANDLE hFile;
@ -8235,10 +8235,10 @@ os_write_impl(PyModuleDef *module, int fd, Py_buffer *data)
#ifdef HAVE_SENDFILE
PyDoc_STRVAR(posix_sendfile__doc__,
"sendfile(out, in, offset, nbytes) -> byteswritten\n\
sendfile(out, in, offset, nbytes, headers=None, trailers=None, flags=0)\n\
"sendfile(out, in, offset, count) -> byteswritten\n\
sendfile(out, in, offset, count, headers=None, trailers=None, flags=0)\n\
-> byteswritten\n\
Copy nbytes bytes from file descriptor in to file descriptor out.");
Copy count bytes from file descriptor in to file descriptor out.");
/* AC 3.5: don't bother converting, has optional group*/
static PyObject *
@ -8258,6 +8258,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
off_t sbytes;
struct sf_hdtr sf;
int flags = 0;
/* Beware that "in" clashes with Python's own "in" operator keyword */
static char *keywords[] = {"out", "in",
"offset", "count",
"headers", "trailers", "flags", NULL};