Neil Schemenauer <[email protected]> added the comment:
I believe the line table format got changed but the frozen code didn't get
re-generated. If you try to call co_lines() on the __hello__ code, Python
crashes.
>>> import __hello__
Hello world!
>>> co = __hello__.__spec__.loader.get_code('__hello__')
>>> co.co_linetable
b'\x04\x01'
>>> list(co.co_lines())
python: ../Objects/codeobject.c:1185: PyLineTable_NextAddressRange: Assertion
`!at_end(range)' failed.
My PR re-generates the code and fixes the test. Perhaps I should also add a
test to exercise co_lines() on the frozen code object.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43372>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com