Enable new I/O. Disable creation of old files.
Lots of stuff fails now, including -S and -m command line flags.
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 7c8e2b2..469eacd 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -265,6 +265,10 @@
PyObject *
PyFile_FromFile(FILE *fp, char *name, char *mode, int (*close)(FILE *))
{
+ PyErr_SetString(PyExc_SystemError,
+ "attempt to create old file from FILE *");
+ return NULL;
+#if 0
PyFileObject *f = (PyFileObject *)PyFile_Type.tp_new(&PyFile_Type,
NULL, NULL);
if (f != NULL) {
@@ -278,6 +282,7 @@
Py_DECREF(o_name);
}
return (PyObject *) f;
+#endif
}
PyObject *
@@ -1941,6 +1946,9 @@
PyObject *self;
static PyObject *not_yet_string;
+ PyErr_SetString(PyExc_SystemError, "attempt to create old file");
+ return NULL;
+
assert(type != NULL && type->tp_alloc != NULL);
if (not_yet_string == NULL) {