Xavier de Gaye added the comment: Sorry for the confusion, the file system encoding is not the locale encoding.
In issue #9548, Antoine proposed a patch that avoids the import of the re, collections and functools modules by the _io module on startup, by refactoring and moving code from locale to _bootlocale. The attached refactor_locale.patch does that for python 3.6. The reasons for why Antoine patch has not been pushed still apply to this patch :( The patch does fix the problem for Android though. ---------- keywords: +patch title: android: test_site fails -> _bootlocale imports locale at startup on Android Added file: http://bugs.python.org/file42928/refactor_locale.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26928> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com