[issue42032] Setting PYTHONPYCACHEPREFIX using ~ (tilde) creates a "~" folder
Petr Viktorin
report at bugs.python.org
Fri Jan 7 09:39:29 EST 2022
Petr Viktorin <encukou at gmail.com> added the comment:
> It would perhaps be useful if the os.path.expanduser call was added in the cache_from_source() function in importlib?
No: that would mean Python would be doing work that the shell should do. Possibly it would be duplicating the work. Possibly it would be doing it wrong. What if your shell uses ⌂ rather than ~? What if the shell has a different idea of what the home directory is? Remember, you can use Python with any shell, not just Unix/POSIX command-line ones (which is what os.path.expanduser emulates).
Thanks for reporting the issue, though! The separation of concerns definitely isn't obvious at first.
----------
nosy: +petr.viktorin
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42032>
_______________________________________
More information about the Python-bugs-list
mailing list