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

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +893

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-17 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7b47c98f24da by Steve Dower in branch '3.6':
Issue #28137: Renames Windows path file to ._pth
https://hg.python.org/cpython/rev/7b47c98f24da

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-15 Thread Steve Dower

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-15 Thread Wolfgang Langner

Wolfgang Langner added the comment:

But this is nearly the same as a *.pth file.
Using the same logic and extension then does not confuse more users.

Why not doing the same as with a .pth file?

Using something like a _sys.pth file if it is there it will be used for path 
handling. In all cases on all platforms for interpreter startup.
(if we will have the embedded interpreter on more platforms)

--
nosy: +tds333

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-09-13 Thread Steve Dower

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com