bpo-46422: use dis.Positions in dis.Instruction#30716
bpo-46422: use dis.Positions in dis.Instruction#30716isidentical merged 6 commits intopython:mainfrom
dis.Positions in dis.Instruction#30716Conversation
isidentical
left a comment
There was a problem hiding this comment.
Thanks for the PR @sobolevn!
- The tests only seem to cover cases where the code object is missing one of the position tables. Let's add a test like
test_co_positionswhich uses the new positions API. - Let's also document the new API
Lib/dis.py
Outdated
| positions = next(co_positions) | ||
| positions = Positions(*next(co_positions)) | ||
| except StopIteration: | ||
| positions = None |
There was a problem hiding this comment.
Let's simply create an empty Positions() object here.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Thanks for the feedback! I've added docs about I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @isidentical: please review the changes made to this pull request. |
isidentical
left a comment
There was a problem hiding this comment.
Thanks a lot, I think it looks good as is but let's clear the documentation a bit.
|
Azure is weirdly failing 🤦🏻 Closing/Re-opening to restart. |
|
Thanks very much for noticing (and fixing) this @sobolevn! |
|
Thanks for the review! 👍 |
CC @corona10 as my mentor.
https://bugs.python.org/issue46422