patch 7.4.1864
Problem: Python: encoding error with Python 2.
Solution: Use "getcwdu" instead of "getcwd". (Ken Takata)
diff --git a/src/if_py_both.h b/src/if_py_both.h
index ce8bacd..50fd687 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -6770,8 +6770,13 @@
return -1;
ADD_OBJECT(m, "os", other_module);
+#if PY_MAJOR_VERSION >= 3
if (!(py_getcwd = PyObject_GetAttrString(other_module, "getcwd")))
return -1;
+#else
+ if (!(py_getcwd = PyObject_GetAttrString(other_module, "getcwdu")))
+ return -1;
+#endif
ADD_OBJECT(m, "_getcwd", py_getcwd)
if (!(py_chdir = PyObject_GetAttrString(other_module, "chdir")))