-
-
Notifications
You must be signed in to change notification settings - Fork 866
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
BUGFIX: Bind functions to window on from js import func
(#461)
#1126
Conversation
Can you add a test for this?
|
About to, just checking if they actually work first. |
I have a bunch of tests that only pass with both this and #1124, so I have to sort through carefully to find the ones that test just this bug separately. |
Currently this always crashes on initialization. |
Test failures are expected: this won't work without #1124 being applied first. I guess I'll merge that here now so that the tests can pass. |
from js import func
(#461)
@hoodmane |
Right this is because |
cc0ebf8
to
ceccde7
Compare
ceccde7
to
c283a18
Compare
@dalcde correctly fixing |
Funnily enough, PR #461 which would have also fixed this also broke |
@dalcde correctly fixing `test_jsproxy_call_kwargs` is moderately complicated so I think the best thing is to `xfail` it here and open a second PR that fixes it.
It *was* working before this PR though
|
Yes, do you prefer:
I guess I can just |
I would prefer a fix in a separate PR, assuming the fix doesn't depend on this. Then this can be merged after the fix is merged. |
The fix will break ~15 tests until this one is merged. |
Then perhaps, as you said, a separate PR on top of this, and then I can merge them consecutively? I would very much prefer master to not regress, but it would be nice to logically separate the changes in history. |
Yeah, this is a pretty tricky tangle of changes. Will do that. |
Instead of making ad-hoc duplicate definitions of
getattr
anddir
injsimport.c
, make aJsProxy
wrappingwindow
and then defineJsImport_GetAttr
andJsImport_Dir
to be transparent passthroughs toJsProxy_GetAttr
andJsProxy_Dir
. (This current implementation ofJsImport_Dir
leaves out some fields that are on the actualPyModule
object, but the previous implementation also leaves those out.I plan to rewrite this whole file anyways in #972, this is just the minimal change that fixes the bug.
Resolves #461.