RFC 68: Make local imports in Python file handlers root-relative#68
Merged
stephenmcgruer merged 2 commits intomasterfrom Nov 17, 2020
Merged
RFC 68: Make local imports in Python file handlers root-relative#68stephenmcgruer merged 2 commits intomasterfrom
stephenmcgruer merged 2 commits intomasterfrom
Conversation
stephenmcgruer
commented
Nov 10, 2020
This was referenced Nov 10, 2020
jgraham
approved these changes
Nov 10, 2020
Contributor
jgraham
left a comment
There was a problem hiding this comment.
This isn't lovely, but we haven't found a better alternative so far.
Ms2ger
approved these changes
Nov 11, 2020
Contributor
Ms2ger
left a comment
There was a problem hiding this comment.
A little annoying, but looking forward to the py3-only future.
stephenmcgruer
added a commit
to web-platform-tests/wpt
that referenced
this pull request
Nov 17, 2020
This changes handlers.py to no longer play with `sys.path` and `sys.modules`, and instead require python file handlers import helper functions with root-relative paths. `__init__.py` files are added as required. Changing this did require changing imports in multiple tests; this can be reverted once we get to Py3-only (and pep 420) and can remove the root `__init__.py`. Docs and tests are updated as appropriate. See web-platform-tests/rfcs#68
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Nov 20, 2020
…lpers via root path, a=testonly Automatic update from web-platform-tests Require Python file handers to import helpers via root path (#26328) This changes handlers.py to no longer play with `sys.path` and `sys.modules`, and instead require python file handlers import helper functions with root-relative paths. `__init__.py` files are added as required. Changing this did require changing imports in multiple tests; this can be reverted once we get to Py3-only (and pep 420) and can remove the root `__init__.py`. Docs and tests are updated as appropriate. See web-platform-tests/rfcs#68 -- wpt-commits: b595c93ddffcb048f85ee0313fa44d822b1889e4 wpt-pr: 26328
aosmond
pushed a commit
to aosmond/gecko
that referenced
this pull request
Nov 22, 2020
…lpers via root path, a=testonly Automatic update from web-platform-tests Require Python file handers to import helpers via root path (#26328) This changes handlers.py to no longer play with `sys.path` and `sys.modules`, and instead require python file handlers import helper functions with root-relative paths. `__init__.py` files are added as required. Changing this did require changing imports in multiple tests; this can be reverted once we get to Py3-only (and pep 420) and can remove the root `__init__.py`. Docs and tests are updated as appropriate. See web-platform-tests/rfcs#68 -- wpt-commits: b595c93ddffcb048f85ee0313fa44d822b1889e4 wpt-pr: 26328
bhearsum
pushed a commit
to mozilla-releng/staging-firefox
that referenced
this pull request
May 1, 2025
…lpers via root path, a=testonly Automatic update from web-platform-tests Require Python file handers to import helpers via root path (#26328) This changes handlers.py to no longer play with `sys.path` and `sys.modules`, and instead require python file handlers import helper functions with root-relative paths. `__init__.py` files are added as required. Changing this did require changing imports in multiple tests; this can be reverted once we get to Py3-only (and pep 420) and can remove the root `__init__.py`. Docs and tests are updated as appropriate. See web-platform-tests/rfcs#68 -- wpt-commits: b595c93ddffcb048f85ee0313fa44d822b1889e4 wpt-pr: 26328
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation CL: web-platform-tests/wpt#26328