-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
ipywidgets expects Comm, not BaseComm #1090
Comments
Hi @matthewturk, please do open a PR. We test most known downstream consumers in |
I think this is an ipywidget issue. @matthewturk In jupyter-widgets/ipywidgets#3602 (comment) I removed the comm being an Instance of this class. I think this will fix it, but we never merged it. |
@maartenbreddels That PR is pretty big though -- does it need to be a part of that, or would a smaller PR that simply loosened restrictions work, so that we don't have to pin all our dependencies to a lower version? |
I think if we just cherry-pick, jupyter-widgets/ipywidgets@c1c34f9 we should be able to get this in sooner. An even saver option, it to change it to |
I will work on finishing jupyter-widgets/ipywidgets#3533 this morning. This PR uses |
I think we should backport this indeed |
Hi! I've been trying to track down an issue with my usage of
ipywidgets
, described on discourse. The basic gist is:model.widget_manager
's methodnew_widget
. In previous versions, this worked, but now, it doesn't.BaseComm
rather than aComm
, which throws a validation error.After digging through this, it looks to me like
ipywidgets
declarescomm = Instance('ipykernel.comm.Comm', allow_none=True)
, butipykernel.ipkernel.create_comm
explicitly creates aBaseComm
, so the traitlet doesn't validate, and the comm fails to properly initialize. This results in the widgets not being synced back to the kernel from the frontend.I confess that while I've spent time going through the code, I'm not entirely sure if this could potentially be a version mismatch, or if this is an oversight for a use case that may not come up terribly frequently.
My versions:
ipywidgets
- 8.0.4ipykernel
- 6.21.1comm
- 0.1.2I was able to address the problem I was having by changing the import and usage of
BaseComm
toComm
inipkernel.py
, and so if this is an acceptable solution I'd be happy to issue a pull request. (My hesitance is that there may be unexpected downstream effects of a change to something so deep in the kernel code, and so I wanted to open the issue as possible first step.)The text was updated successfully, but these errors were encountered: