[issue28138] Windows _sys.path file should allow import site

Steve Dower report at bugs.python.org
Thu Sep 15 11:21:55 EDT 2016


Steve Dower added the comment:

On issue28137 I agreed with the proposal to rename to EXENAME.pth, but rather than supporting all of .pth file's syntax we would abort the process on anything we don't like.

Specifically, we'd allow relative paths, absolute paths, blank lines, comments, and "import site". (The parsing code is written in C and runs before initialization, so we can't exec stuff anyway, but if I had my way I'd ban that from .pth files everywhere.)

Supporting this on other platforms requires porting the code to Python/getpath.c. I took a quick survey of core devs at the sprints and nobody seemed desperate to have it, but it's something that we can add at any time since it is tied to build/install (rather than anything you'd write in Python code).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28138>
_______________________________________


More information about the Python-bugs-list mailing list