New submission from Steve Dower:

Windows's _sys.path file (being renamed from sys.path in b1) currently disable 
the initial "import site; site.main()" call. However, there are legitimate 
cases where you may want to opt-in to this while still controlling the search 
paths.

We should support "import site" as a line in this file that indicates that 
Py_NoSite should *not* be set. We deliberately do not want arbitrary code 
execution from this file - there's a reason it's '.path' and not '.pth'

(While I or someone else is here, we should also handle blank lines and lines 
starting with '#' specially, so that files can be formatted more nicely.)

----------
assignee: steve.dower
components: Windows
messages: 276344
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Windows _sys.path file should allow import site
type: behavior
versions: Python 3.6, Python 3.7

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

Reply via email to