-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Fix issue detecting PyScript worker #6998
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6998 +/- ##
==========================================
+ Coverage 81.25% 81.76% +0.51%
==========================================
Files 326 326
Lines 48124 48164 +40
==========================================
+ Hits 39104 39383 +279
+ Misses 9020 8781 -239 ☔ View full report in Codecov by Sentry. |
gotta be honest ... this line doesn't fully reason well to me ... if you are targeting very old version of PyScript Next you are patching your env the same ... by adding both Accordingly, if it works for the previous Or to rephrase ... why isn't the first Thanks in advance for eventually expanding on that. |
Agreed, that was definitely not correct either.
We strongly recommend people install Panel with the custom wheels we ship in our CDN (they are optimized for size), so the assumption that a particular old version of Pyodide will only load old versions of Panel doesn't necessarily hold. I generally agree that we can reasonably expect people to be on more recent versions of Pyodide/PyScript but with the fixed logic I don't think there's any harm in keeping this. |
fair enough ... as long as you are testing/proving that logic still works ... which would surprise me, as the previous Those lines require more testing, more code, more everything, but it's your project, I am just saying "we encourage our users to always use our latest offer as the project is still relatively young and while robust/stable enough these days ... it's indeed in these days that we reached such stability" ... if that makes sense. |
Part of the problem here was that recent changes to our build infrastructure caused all the PyScript tests to be skipped. I'm working on re-enabling the tests now and will have them error out if they can't be run. |
All I am saying is that if you could just target latest PyScript and be sure stuff works we'll be all good, because we won't back-port fixes to previous releases and all we care about is that current stable channel remains stable. That should be less work for your CI too ... and to be honest, we have people with problems from the 2yo PyScript version, those that jumped into Next already, are usually fine and well understands they might just update the version and have fixes all over the place out of the box. |
This fixes an issue that @antocuni and @WebReflection heroically tracked down. Specifically the issue is that Panel makes various assumptions on which JS APIs it can use in a pyodide context based on whether
js.document
is defined. These assumptions do not hold when we are in a PyScript worker because therecoincident
is used to automatically proxy various JS APIs without having to rely on the custom JS <-> JS Worker message-passing implementation that Panel ships. The logic was incorrectly settingIN_WORKER=True
when we were in a PyScript worker, which in turn causes Panel to make incorrect assumptions on how to pass messages and access DOM APIs.Fixes #6995