Replace imp module with importlib for Python 3.12+

The imp module has been deprecated in Python 3.10+ and removed in Python
3.12, so replace its usage with importlib to maintain compatibility with
newer Python versions. This change updates module loading logic to use
importlib.util functions (spec_from_file_location, module_from_spec,
etc.) which are the recommended replacements for imp's functionality.

Bug: 455210782,336329417
Change-Id: Id69d06b0d663e319cdd097c5715a2b80e2837406
Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/7082166
Reviewed-by: Peng Zhou <zhoupeng.1996@bytedance.com>
Reviewed-by: John Chen <johnchen@chromium.org>
Reviewed-by: Ho Cheung <hocheung@chromium.org>
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Commit-Queue: Peng Zhou <zhoupeng.1996@bytedance.com>
1 file changed
tree: 9cd12cce4b4892c18483d69e0e61699a33343846
  1. bin/
  2. catapult_build/
  3. common/
  4. dashboard/
  5. dependency_manager/
  6. devil/
  7. docs/
  8. experimental/
  9. hooks/
  10. infra/
  11. netlog_viewer/
  12. perf_issue_service/
  13. skia_bridge/
  14. systrace/
  15. telemetry/
  16. third_party/
  17. trace_processor/
  18. tracing/
  19. web_page_replay_go/
  20. .eslintignore
  21. .eslintrc
  22. .gcloudignore
  23. .gitignore
  24. .style.yapf
  25. .vpython3
  26. .yapfignore
  27. AUTHORS
  28. BUILD.gn
  29. codereview.settings
  30. CONTRIBUTING.md
  31. DIR_METADATA
  32. generate_telemetry_build.py
  33. LICENSE
  34. navbar.md
  35. OWNERS
  36. PRESUBMIT.py
  37. pylintrc
  38. README.md
  39. WATCHLISTS
README.md

Catapult

Catapult is the home for several performance tools that span from gathering, displaying and analyzing performance data. This includes:

These tools were created by Chromium developers for performance analysis, testing, and monitoring of Chrome, but they can also be used for analyzing and monitoring websites, and eventually Android apps.

Contributing

Please see our contributor's guide