by pompino · 2y ago · 0 comments
1. Windows has an absurdly short maximum path length of 260 characters.
2. On Windows, moving files to a temporary directory can fail, if the temporary directory has a longer prefix than the original path.
3. When uninstalling, the python utility "pip" first collects files into a temporary directory, then deletes that temporary directory.
4. To avoid running into MAX_PATH limits, pip doesn't use a normal temp directory. Instead, it makes a temporary directory adjacent to the directory it is removing. (https://github.com/pypa/pip/pull/6029)
5. If pip is interrupted while uninstalling, the adjacent temp directory is never deleted.
So, in order to work around a Windows-only problem, pip stopped using standard file locations, creating a new problem that only existed due to the workaround. And then I'm left trying to figure out why I'm running out of disk space.
This is something that languages/runtimes with more effort put into portability already handle for you:
https://github.com/openjdk/jdk/blob/master/src/java.base/win...
If Python doesn't do this it's just because the sort of people who write Python don't care about Windows enough to fix it.
Yeah, I don't see Windows in the top 5.
Then after za'o decades of stories like the above (it is merely the most recent of many) one might wonder how does Microsoft with so many programmers and so much money produce such kusogeware? That continues to waste my time?