CQ-editor
CQ-editor copied to clipboard
Python 3.12 fix: use importlib instead of imp
The imp library has been deprecated since Python 3.4 and was finally removed in Python 3.12. For the isolated usecase within CQ-editor, replacing imp by its successor importlib seems to do the trick. importlib.reload was introduced in Python 3.4, so this would break support for older Python releases. Let me know in case support for older Python versions must be retained.
Additional info: I am not encountering any other issues running CQ-editor on Python 3.12, this appears to be the only fix required.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
03df6fa) 88.68% compared to head (6e5718e) 88.68%.
Additional details and impacted files
@@ Coverage Diff @@
## master #428 +/- ##
=======================================
Coverage 88.68% 88.68%
=======================================
Files 19 19
Lines 1564 1564
Branches 190 190
=======================================
Hits 1387 1387
Misses 143 143
Partials 34 34
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks @thasti