test.bytecode_helper provides various utilities for sensibly testing bytecode generation. It isn't easy for CPython developers to discover, since it isn't documented and the file is mixed in with actual tests in the main test directory. As discussed in #15494, it should be: 1. Moved from Lib/test/ to Lib/test/support (and imports in tests adjusted accordingly) 2. Documented in Doc/library/test.rst This change only affects the default branch (since test.bytecode_helper is new in 3.4)
I wanted to merge the PR of Joannah but I have a question, are you sure that there is nobody using this module. Maybe we could add a warning when a user tries to use the module/function with a DeprecationWarning. Could we have a wrapper raising the warning when we call it and redirect to the new function? Thank you
Just noting for the record that the reason a new warning wasn't needed here is because there is already a general "No compatibility guarantees" warning for the entire test package: https://docs.python.org/3/library/test.html Thanks for getting this resolved!