This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vkbo
Recipients vkbo, zach.ware
Date 2020-10-14.15:09:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602688182.52.0.38045208578.issue42032@roundup.psfhosted.org>
In-reply-to
Content
> 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
History
Date User Action Args
2020-10-14 15:09:42vkbosetrecipients: + vkbo, zach.ware
2020-10-14 15:09:42vkbosetmessageid: <1602688182.52.0.38045208578.issue42032@roundup.psfhosted.org>
2020-10-14 15:09:42vkbolinkissue42032 messages
2020-10-14 15:09:42vkbocreate