[issue29660] Document that print/format_exception ignore etype
New submission from Matthias Bussonnier:
As far as I can tell, http://bugs.python.org/issue17911 made a couple of function in traceback ignore their first arguments (etype) and infer the type from the second one (evalue).
(In git 6bc2c1e7 and 2f0441f0 respectively).
At least print_exception and format_exception are affected.
This likely affect http://bugs.python.org/issue26389 (who wish to expand same API to remove these parameters).
And inconsistency with `format_exception_only` which does need `etype` should be checked.
If etype is a deprecated parameter it should be noted, and should likely raise a DeprecationWarning as well when set.
----------
assignee: docs@python
components: Documentation
messages: 288617
nosy: docs@python, mbussonn
priority: normal
severity: normal
status: open
title: Document that print/format_exception ignore etype
versions: Python 3.5, Python 3.6, Python 3.7
_______________________________________
Python tracker
Changes by Matthias Bussonnier
Changes by Mariatta Wijaya
Mariatta Wijaya added the comment:
New changeset cdb89cd72cbc66e4626914b4a71b9052ddb3a32a by Mariatta (Matthias Bussonnier) in branch 'master':
bpo-29660: traceback: Document that etype is ignored in some places. (GH-344)
https://github.com/python/cpython/commit/cdb89cd72cbc66e4626914b4a71b9052ddb...
----------
nosy: +Mariatta
_______________________________________
Python tracker
Changes by Mariatta Wijaya
Mariatta Wijaya added the comment:
Thanks Matthias.
I can backport this later today.
Or do you want to do it? :)
You can use cherry_picker.py https://github.com/python/core-workflow/tree/master/cherry_picker
----------
_______________________________________
Python tracker
Matthias Bussonnier added the comment:
Thanks @Mariatta, I'll try to cherry-pick!
----------
_______________________________________
Python tracker
Changes by Matthias Bussonnier
Changes by Matthias Bussonnier
Mariatta Wijaya added the comment:
New changeset e417d12d728103445b8516a35f643536e401f120 by Mariatta (Matthias Bussonnier) in branch '3.6':
bpo-29660: traceback: Document that etype is ignored in some places. (GH-344) (GH-1913)
https://github.com/python/cpython/commit/e417d12d728103445b8516a35f643536e40...
----------
_______________________________________
Python tracker
Mariatta Wijaya added the comment:
New changeset cca3d4aa25a7aea0cda90dd2aa012f58c85e7e24 by Mariatta (Matthias Bussonnier) in branch '3.5':
bpo-29660: traceback: Document that etype is ignored in some places. (GH-344) (GH-1914)
https://github.com/python/cpython/commit/cca3d4aa25a7aea0cda90dd2aa012f58c85...
----------
_______________________________________
Python tracker
Mariatta Wijaya added the comment:
Thanks :)
----------
resolution: -> fixed
stage: backport needed -> resolved
status: open -> closed
_______________________________________
Python tracker
участники (2)
-
Mariatta Wijaya
-
Matthias Bussonnier