Barry A. Warsaw <ba...@python.org> added the comment:

On Nov 10, 2018, at 04:50, Ivan Pozdeev <rep...@bugs.python.org> wrote:

> In its .pth file, each such package will import the hook's module (which will 
> cause the hook to be installed on the first import) and "register" its 
> namespaces and/or dependencies with it. The hook will then calculate the 
> required load order and enforce it upon import of any of the registered 
> namespaces.

I’m a little concerned about this approach because it means random third party 
modules can affect the global environment for your application, without knowing 
it.  Since the hook installation happens at import time, and just depending on 
a library that has such a .pth file will install it, the end application will 
not have control over its global state.  It’s not possible to know whether this 
is a serious problem, but in the past, global state changes are problematic 
when applications do not have control over it.

----------

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

Reply via email to