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

On Feb 26, 2019, at 13:23, Ivan Pozdeev <rep...@bugs.python.org> wrote:
> 
> Easy. Insert a chunk into site.py that would call pdb.set_trace() if an 
> envvar (e.g. `PYSITEDEBUG') or a command line switch is set.
> 
> Actually, why can't whoever has this problem add such a chunk themselves? Is 
> this really such a frequent and ubiquitous problem
> that this needs to be in the stock codebase? I suspect we're dealing with a 
> vocal minority here.

Basically yes, I’ve done this.  But think of the poor user who doesn’t have 
that expertise or ability to hack on an installed Python’s site.py file.  When 
their application breaks because some faulty pth was installed behind their 
back, how do they debug their application when the breakage has already 
occurred before Python even gets to their code?  How do they answer questions 
like “where did that magical sys.path entry come from?” or “how did that module 
get in sys.modules already?”

----------

_______________________________________
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