Extension modules
-----------------
+- Bug #703198: Ignore "b" and "t" in os.popen on Unix.
+
- Patch #803998: Deal with errors in SSL_write correctly.
- The xml.parsers.expat module now provides Expat 1.95.7.
PyObject *f;
if (!PyArg_ParseTuple(args, "s|si:popen", &name, &mode, &bufsize))
return NULL;
+ /* Strip mode of binary or text modifiers */
+ if (strcmp(mode, "rb") == 0 || strcmp(mode, "rt") == 0)
+ mode = "r";
+ else if (strcmp(mode, "wb") == 0 || strcmp(mode, "wt") == 0)
+ mode = "w";
Py_BEGIN_ALLOW_THREADS
fp = popen(name, mode);
Py_END_ALLOW_THREADS