gh-99944: remove hardcoded check that op is LOAD_CONST#99943
gh-99944: remove hardcoded check that op is LOAD_CONST#99943chilaxan wants to merge 1 commit intopython:mainfrom
Conversation
3.11 adds a new opcode KW_NAMES that has an entry in co_consts, however the hardcoded check here causes dis to not grab the constant
sobolevn
left a comment
There was a problem hiding this comment.
Please, add a test-case and change your PR title to start with gh-99944:
can you give me a resource for adding a test case? |
carljm
left a comment
There was a problem hiding this comment.
can you give me a resource for adding a test case?
The tests for Lib/dis.py are in Lib/test/test_dis.py. You should be able to look through existing test cases there and find some tests that are suitable to copy and modify. You just want a test that verifies the dis output for some code that includes KW_NAMES opcode.
Also, please add a What's New entry.
If those things are done, this PR looks good to me.
|
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 |
|
Just to build on @carljm's excellent advice — there's also some resources on running and writing tests for CPython here: https://devguide.python.org/testing/run-write-tests/ |
|
This was completed during the sprint in #103856. Thank you! |
3.11 adds a new opcode KW_NAMES that has an entry in co_consts, however the hardcoded check here causes dis to not grab the constant