Commit b595c93
authored
Require Python file handers to import helpers via root path (web-platform-tests#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#681 parent 2089a7c commit b595c93
File tree
53 files changed
+177
-69
lines changed- common
- security-features
- scope
- subresource
- cookies
- resources
- docs/writing-tests/python-handlers
- resource-timing
- tools
- ci
- tc/tests
- tests
- lint/tests
- manifest/tests
- wptserve
- tests/functional/docroot
- subdir
- wptserve
- wpt/tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+177
-69
lines changedWhitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments