From 73ea5481590ec85d72550b30fe2bf0fa764f88e8 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 4 Jul 2019 13:12:52 -0400 Subject: [PATCH] py3: name for file-from-fd is unneeded, since py3 won't show it anyway "Changed in version 3.2: Ignore name attribute." --- src/calibre/utils/speedup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/utils/speedup.c b/src/calibre/utils/speedup.c index d270f3678c..86767d5aa0 100644 --- a/src/calibre/utils/speedup.c +++ b/src/calibre/utils/speedup.c @@ -139,7 +139,7 @@ speedup_fdopen(PyObject *self, PyObject *args) { if (!PyArg_ParseTuple(args, "iss|i", &fd, &name, &mode, &bufsize)) return NULL; #if PY_MAJOR_VERSION >= 3 - ans = PyFile_FromFd(fd, name, mode, bufsize, NULL, NULL, NULL, 1); + ans = PyFile_FromFd(fd, NULL, mode, bufsize, NULL, NULL, NULL, 1); #else fp = fdopen(fd, mode); if (fp == NULL) return PyErr_SetFromErrno(PyExc_OSError);