Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = None created_at = <Date 2022-04-05.23:22:06.882> labels = ['3.11', 'docs'] title = 'Document types.CodeType.replace() changes about co_exceptiontable' updated_at = <Date 2022-04-05.23:23:47.642> user = 'https://github.com/vstinner'
bugs.python.org fields:
activity = <Date 2022-04-05.23:23:47.642> actor = 'gvanrossum' assignee = 'docs@python' closed = False closed_date = None closer = None components = ['Documentation'] creation = <Date 2022-04-05.23:22:06.882> creator = 'vstinner' dependencies = [] files = [] hgrepos = [] issue_num = 47236 keywords = [] message_count = 1.0 messages = ['416831'] nosy_count = 3.0 nosy_names = ['gvanrossum', 'vstinner', 'docs@python'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = None url = 'https://bugs.python.org/issue47236' versions = ['Python 3.11']
The text was updated successfully, but these errors were encountered:
It would be nice to document the bpo-40222 changes in What's New in Python 3.11 and in the CodeType documentation:
Users of types.CodeType.replace(co_code=new_code) must now pass co_exceptiontable or exception handling will no longer work as expected. Callers are responsible to build co_exceptiontable.
Currently, the format of this table is documented at: https://github.com/python/cpython/blob/main/Objects/exception_handling_notes.txt
There is no public function to encode this table, it's also the responsibility of the caller.
See also bpo-47185 "code.replace(co_code=new_code) no longer catch exceptions on Python 3.11" closed as "won't fix" for the background.
Sorry, something went wrong.
No branches or pull requests
vstinner commentedApr 5, 2022
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: