_Py_fopen now allows bytes filenames under non-Windows platforms.
diff --git a/Python/fileutils.c b/Python/fileutils.c
index 8c049e0..1e71431 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -321,8 +321,8 @@
     return _wfopen(wpath, wmode);
 #else
     FILE *f;
-    PyObject *bytes = PyUnicode_EncodeFSDefault(path);
-    if (bytes == NULL)
+    PyObject *bytes;
+    if (!PyUnicode_FSConverter(path, &bytes))
         return NULL;
     f = fopen(PyBytes_AS_STRING(bytes), mode);
     Py_DECREF(bytes);