You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-01-07.15:43:57.994>created_at=<Date2017-09-13.12:25:50.310>labels= ['3.7', 'type-bug', 'library']
title='Subprocess exceptions re-raised in parent process do not have child_traceback attribute'updated_at=<Date2019-01-07.15:43:57.994>user='https://github.com/msekletar'
Issue
-----
Documentation of subprocess module claims that exceptions raised in child process will be re-raised in the parent process and will have child_traceback attribute set [1]. At least on Fedora Rawhide with python-3.6.2 this is not the case.
try:
subprocess.Popen(['/bin/echo', 'foobar'], preexec_fn=p)
except subprocess.SubprocessError as e:
if not hasattr(e, 'child_traceback'):
print('BUG: Exception happened in child, but exception object does not have child_traceback attribute')
Actual result
-------------
$ ./preexec-exception.py
BUG: Exception happened in child, but exception object does not have child_traceback attribute
Expected result
---------------
No output, because child_traceback attribute is present
Documentation and implementation are out of sync. Python 3's subprocess module no longer sets child_traceback. I checked 3.3 to master. The assignment has been removed.
New changeset 47a2fce by Gregory P. Smith (Harmandeep Singh) in branch 'master': bpo-31450: Remove documentation mentioning that subprocess's child_traceback is available with the parent process (GH-11422) 47a2fce
New changeset 47c035f by Miss Islington (bot) in branch '3.7': bpo-31450: Remove documentation mentioning that subprocess's child_traceback is available with the parent process (GH-11422) 47c035f
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: