[Python-ideas] Security: remove "." from sys.path?

Todd toddrjen at gmail.com
Sat Jun 3 15:14:04 EDT 2017


On Jun 3, 2017 2:45 PM, "Chris Angelico" <rosuav at gmail.com> wrote:

On Sun, Jun 4, 2017 at 12:42 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> But I don't think that running an application from the source without
>> installing it is the most common way to run an application. Most users
>> install applications to use them, no?
>
> Scripts are very frequently run without installing them, as are things
> like Jupyter Notebooks, so any change along these lines would need to
> be carefully planned to avoid being unduly disruptive.
>

A single-file script wouldn't be affected; only something that has
more than one file "side by side" in an arbitrary directory, and
imports one from the other. Do Jupyter notebooks do that? I've no idea
how they work under the covers.

ChrisA


It seems to be pretty common in unit tests in my experience.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170603/5a95d28b/attachment.html>


More information about the Python-ideas mailing list