Page MenuHomePhabricator

Bug 1857516 - Get rid of deprecated imp python module in favor of importlib r=saschanaz!
ClosedPublic

Authored by sergesanspaille on Oct 9 2023, 12:35 PM.
Referenced Files
Unknown Object (File)
Mon, Oct 13, 12:21 AM
Unknown Object (File)
Sat, Oct 11, 2:22 AM
Unknown Object (File)
Aug 5 2025, 11:41 PM
Unknown Object (File)
Aug 5 2025, 11:41 PM
Unknown Object (File)
Aug 5 2025, 11:41 PM
Unknown Object (File)
Aug 5 2025, 11:41 PM
Unknown Object (File)
Aug 5 2025, 11:41 PM
Unknown Object (File)
Aug 5 2025, 11:20 AM

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
23

Maybe we should get a common helper function for this?

dom/bindings/mozwebidlcodegen/test/test_mozwebidlcodegen.py
29

Maybe we should remove this comment or uncomment it if needed.

tools/tryselect/test/test_mozharness_integration.py
97

This one should ideally also have a helper function.

sergesanspaille retitled this revision from Bug 1857516 - Get rid of deprecated imp python module in favor of importlib r=saschanaz to Bug 1857516 - Get rid of deprecated imp python module in favor of importlib r=saschanaz!.

@saschanaz : function put in a common module to avoid duplication.

Code analysis found 3 defects in diff 774464:

  • 1 defect found by py-black (Mozlint)
  • 2 defects found by py-ruff (Mozlint)
IMPORTANT: Found 3 defects (error level) that must be fixed before landing.

You can run this analysis locally with:

  • ./mach lint --warnings --outgoing

If you see a problem in this automated review, please report it here.

You can view these defects in the Diff Detail section of Phabricator diff 774464.

saschanaz added inline comments.
testing/mozbase/mozfile/mozfile/mozfile.py
646

Do we want this comment here? I wonder it should be uncommented, as caching things should generally make things faster, and at least one test expects that: https://treeherder.mozilla.org/jobs?repo=try&revision=2af889f367f664227dbaabd0d721d76237fee71b&selectedTaskRun=STFFGhgWTYaDuM5RuHgsHQ.0

testing/web-platform/tests/service-workers/service-worker/resources/scope1/redirect.py
3

testing/web-platform/tests/ is external and shared with other browsers, and they probably won't get access to mozfile. We should probably have a separate helper function for WPT.

This revision now requires changes to proceed.Oct 11 2023, 7:05 PM
sergesanspaille updated this revision to Diff 775046.
sergesanspaille marked 5 inline comments as done.

Code analysis found 1 defect in diff 775052:

  • 1 defect found by py-black (Mozlint)

2 defects closed compared to the previous diff 775046.

IMPORTANT: Found 1 defect (error level) that must be fixed before landing.

You can run this analysis locally with:

  • ./mach lint --warnings --outgoing

If you see a problem in this automated review, please report it here.

You can view these defects in the Diff Detail section of Phabricator diff 775052.

1 defect closed compared to the previous diff 775052.


If you see a problem in this automated review, please report it here.

Nice, thanks!

testing/marionette/harness/marionette_harness/marionette_test/testcases.py
375
380

(We might want to have a parameter to disable the cache)

This revision is now accepted and ready to land.Oct 17 2023, 9:17 AM
This revision is now accepted and ready to land.Oct 17 2023, 10:37 AM