-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
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
3.13 dis: the show_caches argument is deprecated but the documentation is incomplete #114616
Comments
It means that the same thing happens, no matter what value you pass in for this arg.
No, representing the cache entries as if they are bytecodes doesn't really make sense, and should not have been done. The caches are a part of the instruction, and now they are represented by a field on the Instruction instance. I'll look into the doc improvements you suggest (unless you beat me to it). |
Thank you for the answer. I found also another related doc issue
The doc says nothing different currently for 3.13. and this might break user code which relied on the behavior like:
And yes, I can also try to fix the docs if you want. But I don't know which name should be added in the what's new section. |
It is not deprecated in the |
The change wasn't in 3.13, it was in 3.11 when the caches were added. The caches are mentioned in the doc under 3.11. |
thank you. |
…ion in dis (pythonGH-120033) (cherry picked from commit 770f3c1) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Documentation
show_caches was deprecated in 3.13 for dis.get_instructions.
The documentation misses the following things:
get_instructions:
The documentation says:
problems:
My first assumption was that "The cache_info field of each instruction" would mean that each instruction (including Cache instructions) would be part of the returned list, but this is not the case.
Bytecode:
Bytecode() has also a show_caches parameter which has no effect any more but the deprecation is not documented.
Questions
Is it still possible to get access to the Cache bytecodes? They are only visible with dis.dis(...,show_caches=True) but I found no way to access the
Cache
bytecode objects.should this deprecation be part of the whatsnew page for 3.13?
Linked PRs
The text was updated successfully, but these errors were encountered: