This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients christian.heimes, serhiy.storchaka
Date 2017-11-05.14:06:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509890795.04.0.213398074469.issue31949@psf.upfronthosting.co.za>
In-reply-to
Content
0fbab7ff8d2efd92e222fcc13c0aff0998c3c158 changed the semantic of PyTraceBack_Print and sys.tracebacklimit. It no longer match the documentation and the behavior of the traceback module. Setting sys.tracebacklimit to 0 or less no longer suppress printing tracebacks in PyTraceBack_Print(). Setting sys.tracebacklimit to None (as at shutdown stage) no longer makes PyTraceBack_Print() using default limit, but suppress printing tracebacks and sets a TypeError without returning failure from PyTraceBack_Print().

The proposed PR restores the initial purposed semantic and fixes several other bugs in PyTraceBack_Print().

* Setting sys.tracebacklimit to 0 or less now suppress printing tracebacks.
* Setting sys.tracebacklimit to None now causes using the default limit.
* Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using the limit LONG_MAX rather than the default limit.
* Fixed integer overflows in the case of more than 2**31 items on Windows.
* Fixed output errors handling.
History
Date User Action Args
2017-11-05 14:06:35serhiy.storchakasetrecipients: + serhiy.storchaka, christian.heimes
2017-11-05 14:06:35serhiy.storchakasetmessageid: <1509890795.04.0.213398074469.issue31949@psf.upfronthosting.co.za>
2017-11-05 14:06:34serhiy.storchakalinkissue31949 messages
2017-11-05 14:06:34serhiy.storchakacreate