In PyFile_WriteString(), call PyUnicode_FromString() instead of
PyString_FromString(). This is arguably more correct, even if it
shouldn't matter much (all the input is likely to be ASCII).
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 372cf43..34bca68 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -177,7 +177,7 @@
return -1;
}
else if (!PyErr_Occurred()) {
- PyObject *v = PyString_FromString(s);
+ PyObject *v = PyUnicode_FromString(s);
int err;
if (v == NULL)
return -1;