New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3: port tests in xhr [part 3] #24274
Conversation
response.headers.set('Access-Control-Max-Age', '0') | ||
response.headers.set('Access-Control-Allow-Headers', headers) | ||
headers = b'x-custom-s,x-custom-test,x-custom-u,x-custom-ua,x-custom-v' | ||
if request.method == u'OPTIONS': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exception to the "always use byte sequences" general rule isn't documented in https://github.com/web-platform-tests/rfcs/blob/master/rfcs/wptserve_py3.md. Is there more up-to-date guidance for test authors/reviewers which covers this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#23362 is the tracking issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks!
auth = imp.load_source("", os.path.join(here, | ||
"..", | ||
"authentication.py")) | ||
auth = imp.load_source(u"", os.path.join(here, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like getting this import right is the source of most of the complexity, and that imp.load_source
is only used in these tests and in service-workers/, apart from tools/. Still I don't know if there is a better way, searching I've come up empty-handed and think that adding a __init__.py
and using from .. import authentication
might be the only way.
@Hexcles @jgraham is there some way to clean this up to avoid all of the path juggling here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've filed #24588 about this to unblock this PR.
wpt-firefox-nightly-stability failed on Taskcluster, but I'm betting that was pre-existing flakiness and will admin merge. |
Stability check failure was:
wpt.fyi does not show any history of flake via single-runs. I'll look into reproducing this before/after this PR to confirm. |
I can reproduce at 2300345, which should be before this PR, so we should be good. |
No description provided.