[Python-Dev] Add a developer mode to Python: -X dev command line option
victor.stinner at gmail.com
Thu Nov 16 11:42:11 EST 2017
2017-11-16 15:47 GMT+01:00 Yury Selivanov <yselivanov.ml at gmail.com>:
> Overall I don't see an issue with enabling asyncio debug mode when
> python is executed with "-X dev".
> If the purpose of the flag is to
> make Python super verbose and it will not be recommended to use it in
> production -- then why not.
Running an application in debug mode or "developer mode" was never
recommanded by anyone. Who runs Django in debug mode on production?
:-) (Nobody, I hope.)
I'm working on the -X dev documentation to clarify its purpose.
No, the developer mode must not flood stdout with debug messages. It
should only emit warnings if a potential or real bug is detected. For
example, I don't want to enable the debug mode of ftplib in the
developer mode, since this option logs each FTP command to stdout.
It's a different use case.
About performance, IMHO the purpose of the developer mode is to enable
additional checks to ease debug, checks were are too expensive to be
enabled by default. This definition fits well with the asyncio debug
More information about the Python-Dev