New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

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.

----------
assignee: serhiy.storchaka
components: Interpreter Core
messages: 305595
nosy: christian.heimes, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Bugs in PyTraceBack_Print()
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31949>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to