summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Panter <vadmium>2015-09-09 06:27:43 (GMT)
committerMartin Panter <vadmium>2015-09-09 06:27:43 (GMT)
commit6088b7bd492aed4524a34156a1ecfd5facc17faa (patch)
treed831fee7798b5397ee742663b7c98f3bb3573ffe
parent52ee2471b3e0a62db47e36f7f8fe7a2c24ac1ff9 (diff)
parent9499413508b7ff4e7806f8f8e59ba9176d98b39c (diff)
downloadcpython-6088b7bd492aed4524a34156a1ecfd5facc17faa.zip
cpython-6088b7bd492aed4524a34156a1ecfd5facc17faa.tar.gz
cpython-6088b7bd492aed4524a34156a1ecfd5facc17faa.tar.bz2
Merge 3.4 into 3.5
-rw-r--r--Doc/library/os.rst2
-rw-r--r--Lib/test/test_os.py2
-rw-r--r--Modules/posixmodule.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 25888e4..13f83c6 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1072,7 +1072,7 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
.. function:: sendfile(out, in, offset, count)
- sendfile(out, in, offset, count, headers=None, trailers=None, flags=0)
+ sendfile(out, in, offset, count, [headers], [trailers], flags=0)
Copy *count* bytes from file descriptor *in* to file descriptor *out*
starting at *offset*.
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index f675259..0b77835 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -2332,7 +2332,7 @@ class TestSendfile(unittest.TestCase):
**{'in': self.fileno})
if self.SUPPORT_HEADERS_TRAILERS:
os.sendfile(self.sockno, self.fileno, offset=0, count=4096,
- headers=None, trailers=None, flags=0)
+ headers=(), trailers=(), flags=0)
# --- headers / trailers tests
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 5697495..c0baf6a 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -8236,7 +8236,7 @@ os_write_impl(PyModuleDef *module, int fd, Py_buffer *data)
#ifdef HAVE_SENDFILE
PyDoc_STRVAR(posix_sendfile__doc__,
"sendfile(out, in, offset, count) -> byteswritten\n\
-sendfile(out, in, offset, count, headers=None, trailers=None, flags=0)\n\
+sendfile(out, in, offset, count[, headers][, trailers], flags=0)\n\
-> byteswritten\n\
Copy count bytes from file descriptor in to file descriptor out.");
@@ -8278,7 +8278,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
if (headers != NULL) {
if (!PySequence_Check(headers)) {
PyErr_SetString(PyExc_TypeError,
- "sendfile() headers must be a sequence or None");
+ "sendfile() headers must be a sequence");
return NULL;
} else {
Py_ssize_t i = 0; /* Avoid uninitialized warning */
@@ -8295,7 +8295,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
if (trailers != NULL) {
if (!PySequence_Check(trailers)) {
PyErr_SetString(PyExc_TypeError,
- "sendfile() trailers must be a sequence or None");
+ "sendfile() trailers must be a sequence");
return NULL;
} else {
Py_ssize_t i = 0; /* Avoid uninitialized warning */