bpo-42634: Mark reraise after except blocks as artificial. (GH-23877)

* Mark reraise after except blocks as artificial.

* Update importlib

* Update dis test.
This commit is contained in:
Mark Shannon 2020-12-21 13:53:50 +00:00 committed by GitHub
parent d515c610c6
commit f2dbfd7e20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 5067 additions and 5036 deletions

View file

@ -3129,6 +3129,8 @@ compiler_try_except(struct compiler *c, stmt_ty s)
compiler_use_next_block(c, except);
}
compiler_pop_fblock(c, EXCEPTION_HANDLER, NULL);
/* Mark as artificial */
c->u->u_lineno = -1;
ADDOP_I(c, RERAISE, 0);
compiler_use_next_block(c, orelse);
VISIT_SEQ(c, stmt, s->v.Try.orelse);