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.

classification
Title: Document that print/format_exception ignore etype
Type: Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, docs@python, mbussonn
Priority: normal Keywords:

Created on 2017-02-27 01:21 by mbussonn, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 344 merged mbussonn, 2017-02-27 15:37
PR 1913 merged mbussonn, 2017-06-02 03:18
PR 1914 merged mbussonn, 2017-06-02 03:19
Messages (7)
msg288617 - (view) Author: Matthias Bussonnier (mbussonn) * Date: 2017-02-27 01:21
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.
msg294973 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-01 21:54
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/cdb89cd72cbc66e4626914b4a71b9052ddb3a32a
msg294974 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-01 22:08
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
msg294976 - (view) Author: Matthias Bussonnier (mbussonn) * Date: 2017-06-02 03:02
Thanks @Mariatta, I'll try to cherry-pick!
msg294977 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-02 03:26
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/e417d12d728103445b8516a35f643536e401f120
msg294978 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-02 03:26
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/cca3d4aa25a7aea0cda90dd2aa012f58c85e7e24
msg294979 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-02 03:27
Thanks :)
History
Date User Action Args
2022-04-11 14:58:43adminsetgithub: 73846
2017-06-02 03:27:41Mariattasetstatus: open -> closed
resolution: fixed
messages: + msg294979

stage: backport needed -> resolved
2017-06-02 03:26:59Mariattasetmessages: + msg294978
2017-06-02 03:26:17Mariattasetmessages: + msg294977
2017-06-02 03:19:39mbussonnsetpull_requests: + pull_request1994
2017-06-02 03:18:09mbussonnsetpull_requests: + pull_request1993
2017-06-02 03:02:01mbussonnsetmessages: + msg294976
2017-06-01 22:08:01Mariattasetmessages: + msg294974
2017-06-01 21:54:50Mariattasetstage: patch review -> backport needed
2017-06-01 21:54:04Mariattasetnosy: + Mariatta
messages: + msg294973
2017-05-17 20:45:30Mariattasetstage: patch review
2017-02-27 15:37:37mbussonnsetpull_requests: + pull_request297
2017-02-27 01:21:38mbussonncreate