Closed Bug 1452896 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 10397 - Add python handler directory to Python path in wptserve

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 10397 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/w3c/web-platform-tests/pull/10397
Details from upstream follow.

James Graham <james@hoppipolla.co.uk> wrote:
>  Add python handler directory to Python path in wptserve
>  
>  Currently making import of files relative to the handler is tricky
>  because, unlike in normal Python, the script directory isn't on the
>  path.
>  
>  This patch adds it to the path when executing the handler. It also
>  ensures that any modifications made to the path or to sys.modules are
>  rolled back after the handler has run.
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4223e774159b
[wpt PR 10397] - Add python handler directory to Python path in wptserve, a=testonly
https://hg.mozilla.org/mozilla-central/rev/4223e774159b
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.