-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python-helper: update deprecated code
Currently python-helper.py imports the imp module, but this module has been deprecated since version 3.4 and removed in version 3.12. Refactorize the code to handle Python versioning by moving the code at the start of the file. Use one block for python>=3.0, declaring the report_trace_real function. Use a second block for python>=3.5, declaring the new_module function. Add tests for python2 support. Fix incorrect code using comparison to `None` instead of `cond is None`. Reported by ruff check. Format the code with ruff format, with line-length = 100.
- Loading branch information
Showing
2 changed files
with
57 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters