Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-05 Thread Barry Warsaw
> I don't know what is the best option, but I dislike adding two > options, PYTHONBREAKPOINT and -X nobreakpoint, for the same features. > I would become complicated to know which option has the priority. Just to close the loop, I’ve landed the PEP 553 PR treating PYTHONBREAKPOINT the same as all

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-05 Thread Victor Stinner
> What if make the default value depending on the debug level? In debug mode > it is "pdb.set_trace", in optimized mode it is "0". Then in production > environments you can use -E -O for ignoring environment settings and disable > breakpoints. I don't know what is the best option, but I dislike ad

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-05 Thread Serhiy Storchaka
04.10.17 21:06, Barry Warsaw пише: Victor brings up a good question in his review of the PEP 553 implementation. https://github.com/python/cpython/pull/3355 https://bugs.python.org/issue31353 The question is whether $PYTHONBREAKPOINT should be ignored if -E is given? I think it makes sense for

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-05 Thread Victor Stinner
I concur with Antoine, please don't add a special case for -E. But it seems like you already agreed with that :-) Victor Le 5 oct. 2017 05:33, "Barry Warsaw" a écrit : > On Oct 4, 2017, at 21:52, Nick Coghlan wrote: > > > >> Unfortunately we probably won’t really get a good answer in practice

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-04 Thread Barry Warsaw
On Oct 4, 2017, at 21:52, Nick Coghlan wrote: > >> Unfortunately we probably won’t really get a good answer in practice until >> Python 3.7 is released, so maybe I just choose one and document that the >> behavior of PYTHONBREAKPOINT under -E is provision for now. If that’s >> acceptable, the

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-04 Thread Nick Coghlan
On 5 October 2017 at 10:28, Barry Warsaw wrote: >> """Special cases aren't special enough to break the rules.""" >> >> People expect -E to disable envvar-driven overrides, so just treat it >> like that and don't try to second-guess the user. > > And of course "Although practicality beats purity.”

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-04 Thread Barry Warsaw
> """Special cases aren't special enough to break the rules.""" > > People expect -E to disable envvar-driven overrides, so just treat it > like that and don't try to second-guess the user. And of course "Although practicality beats purity.” :) So while I agree that the consistency argument make

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-04 Thread Guido van Rossum
Well that also makes sense. On Wed, Oct 4, 2017 at 1:52 PM, Antoine Pitrou wrote: > On Wed, 4 Oct 2017 14:06:48 -0400 > Barry Warsaw wrote: > > Victor brings up a good question in his review of the PEP 553 > implementation. > > > > https://github.com/python/cpython/pull/3355 > > https://bugs.py

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-04 Thread Antoine Pitrou
On Wed, 4 Oct 2017 14:06:48 -0400 Barry Warsaw wrote: > Victor brings up a good question in his review of the PEP 553 implementation. > > https://github.com/python/cpython/pull/3355 > https://bugs.python.org/issue31353 > > The question is whether $PYTHONBREAKPOINT should be ignored if -E is give

Re: [Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-04 Thread Guido van Rossum
Treating -E as PYTHONBREAKPOINT=0 makes sense. On Wed, Oct 4, 2017 at 11:06 AM, Barry Warsaw wrote: > Victor brings up a good question in his review of the PEP 553 > implementation. > > https://github.com/python/cpython/pull/3355 > https://bugs.python.org/issue31353 > > The question is whether $

[Python-Dev] PEP 553; the interaction between $PYTHONBREAKPOINT and -E

2017-10-04 Thread Barry Warsaw
Victor brings up a good question in his review of the PEP 553 implementation. https://github.com/python/cpython/pull/3355 https://bugs.python.org/issue31353 The question is whether $PYTHONBREAKPOINT should be ignored if -E is given? I think it makes sense for $PYTHONBREAKPOINT to be sensitive to