The Python Debug Build document lists changes compared to a release build:
https://docs.python.org/dev/using/configure.html#python-debug-build

Sometimes, I'm confused that "./python" (Python built locally in debug
mode) displays warnings, whereas "python" (Fedora package) doesn't.


See also the Python Development Mode:
https://docs.python.org/dev/library/devmode.html#devmode

The documentation starts with: "The Python Development Mode introduces
additional runtime checks that are too expensive to be enabled by
default."

Victor

On Tue, Sep 28, 2021 at 3:33 PM Eric V. Smith <e...@trueblade.com> wrote:
>
> On 9/28/2021 9:17 AM, Antoine Pitrou wrote:
> > On Tue, 28 Sep 2021 09:14:38 -0400
> > "Eric V. Smith" <e...@trueblade.com> wrote:
> >> On 9/28/2021 9:10 AM, Antoine Pitrou wrote:
> >>> On Tue, 28 Sep 2021 08:55:05 -0400
> >>> "Eric V. Smith" <e...@trueblade.com> wrote:
> >>>>> So I prefer to teach everybody how to use "-X frozen_modules=off" if
> >>>>> they want to hack the stdlib for their greatest pleasure. I prefer
> >>>>> that such special use case requires an opt-in option, the special use
> >>>>> case is not special enough to be the default.
> >>>> I agree with Victor here: I'd rather have #1.
> >>>>
> >>>> As a compromise, how about go with #1, but print a warning if python
> >>>> detects that it's not built with optimizations or is run from a source
> >>>> tree (the conditions in #2 and #3)? The warning could suggest running
> >>>> with "-X frozen_modules=off". I realize that it will probably be ignored
> >>>> over time, but maybe it will provide enough of a reminder if someone is
> >>>> debugging and sees the warning.
> >>> What would be the point of printing a warning instead of doing just
> >>> what the user is expecting?
> >> To me, the point would be to get the same behavior no matter which
> >> python executable I run, and without regard to where I run it from.
> > But why do you care about this?  What does it change *concretely*?
>
> It reduces the number of things I have to remember which are different
> based on where I'm running python (or which executable I'm running).
>
> Eric
>
> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/2FN2OCYGMLU5XST44N7SFDUAI426VRB3/
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/F6SHNS7EU2JCBV4FMYMFPC2JZZJV2L6Y/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to