Skip to content

bpo-39114: Fix tracing of except handlers with name binding (GH-17769)#136

Merged
sthagen merged 1 commit into
sthagen:masterfrom
python:master
Jan 2, 2020
Merged

bpo-39114: Fix tracing of except handlers with name binding (GH-17769)#136
sthagen merged 1 commit into
sthagen:masterfrom
python:master

Conversation

@sthagen
Copy link
Copy Markdown
Owner

@sthagen sthagen commented Jan 2, 2020

When producing the bytecode of exception handlers with name binding (like except Exception as e) we need to produce a try-finally block to make sure that the name is deleted after the handler is executed to prevent cycles in the stack frame objects. The bytecode associated with this try-finally block does not have source lines associated and it was causing problems when the tracing functionality was running over it.

When producing the bytecode of exception handlers with name binding (like `except Exception as e`) we need to produce a try-finally block to make sure that the name is deleted after the handler is executed to prevent cycles in the stack frame objects. The bytecode associated with this try-finally block does not have source lines associated and it was causing problems when the tracing functionality was running over it.
@sthagen sthagen merged commit 5d7adda into sthagen:master Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants