Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 20, 2022

Copy link
Member

@isidentical isidentical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_positions which 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's simply create an empty Positions() object here.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@sobolevn
Copy link
Member Author

sobolevn commented Jan 20, 2022

Thanks for the feedback! I've added docs about position field, but I didn't cover Positions namedtuple explicitly. I hope that reference to some "namedtuple" is good enough. But, I can fix it if needed 🙂

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@isidentical: please review the changes made to this pull request.

Copy link
Member

@isidentical isidentical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, I think it looks good as is but let's clear the documentation a bit.

@isidentical
Copy link
Member

Azure is weirdly failing 🤦🏻 Closing/Re-opening to restart.

@isidentical isidentical reopened this Jan 24, 2022
@isidentical isidentical merged commit 58f3d98 into python:main Jan 24, 2022
@isidentical
Copy link
Member

Thanks very much for noticing (and fixing) this @sobolevn!

@sobolevn
Copy link
Member Author

Thanks for the review! 👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants