Skip to content

Conversation

@markshannon
Copy link
Member

@markshannon markshannon commented Jan 12, 2021

This PR:

  • Marks the cleanup code at end of try-except and with as artificial
  • Keeps the CFG normalized by eliminating empty blocks between passes.
  • Does a better job of propagating line numbers across of blocks, to ensure that exits have line numbers.

No NEWS as this is tidying up loose ends of the PEP 626 implementation.

https://bugs.python.org/issue42908

@markshannon markshannon reopened this Jan 12, 2021
@markshannon markshannon merged commit 3bd6035 into python:master Jan 13, 2021
@bedevere-bot
Copy link

@markshannon: Please replace # with GH- in the commit message next time. Thanks!

@markshannon markshannon deleted the make-jumps-at-end-try-except-artificial branch January 13, 2021 12:05
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…python#24202)

* Mark bytecodes at end of try-except as artificial.

* Make sure that the CFG is consistent throughout optimiization. 

* Extend line-number propagation logic so that implicit returns after 'try-except' or 'with' have the correct line numbers.

* Update importlib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants