[Python-Dev] Add a developer mode to Python: -X dev command line option

Victor Stinner victor.stinner at gmail.com
Thu Nov 16 07:56:16 EST 2017


2017-11-16 13:43 GMT+01:00 Antoine Pitrou <antoine at python.org>:
>> About asyncio debug mode, if it's too expensive to be used to develop
>> an application, maybe there is an issue with additional checks? Should
>> we remove some of them to be able to use asyncio debug mode in more
>> cases?
>
> Well, I'm sure some people like them, otherwise they wouldn't have been
> added to the codebase in the first place :-)  For example, knowing where
> a Future was created can make debug logs much more informative.

The most expensive part of asyncio debug mode is the code to extracts
the current stack when a coroutine or a handle is created.

Would it make sense to modify asyncio debug mode to skip the traceback
by default, but add a second debug level which extracts the traceback?

Victor


More information about the Python-Dev mailing list