Paths and file names on Unix fundamentally do not have encoding: the filesystem represents them as sequences of bytes, and it is entirely possible to have a directory full of folders where there is no codec that is capable of faithfully or even reasonably decoding all of the names contained (or even that Unicode itself is capable of representing the semantically correct decoding of the filenames if you knew what theoretical codec represented them in the first place).<p>It is therefore a fundamental mistake and a misinterpretation of the semantics of filesystems by Python 3 to insist that file names are represented by Unicode strings with a locale-sensitive encoding; in fact, I question whether there are interesting security ramifications inherent in this mistake (such as allowing me to change the locale in which a process is running and thereby remap its import path; this coming up, of course, as this article is largely about sys.path and Unicode).