Veronica Olsen <jadzia...@gmail.com> added the comment:

> AFAIK, tilde expansion is entirely up to your shell rather than Python

Yes, I am uncertain what exactly is going on here. Whatever ends up in the 
sys.pycache_prefix variable is different with the same environment variable 
setting on the two systems. It may simply be an OS quirk. I am running on 
Debian testing after all.

It is clear from the CPython source that Python does nothing with the tilde. It 
eventually calls os.makedirs() in the compile() function, which I guess is when 
my tilde folder was made.

It would perhaps be useful if the os.path.expanduser call was added in the 
cache_from_source() function in importlib?

As for the results from the debug checks:

1)
Debian: GNU bash, version 5.0.18(1)-release (x86_64-pc-linux-gnu)
Ubuntu: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

2)
They both expand ~ to the home folder

3)
They both return ~/test

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42032>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to