We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af3d13f commit ac7285eCopy full SHA for ac7285e
bigframes/display/__init__.py
@@ -20,6 +20,15 @@
20
21
22
def __getattr__(name: str) -> Any:
23
+ """Lazily import TableWidget to avoid ZMQ port conflicts.
24
+
25
+ anywidget and traitlets eagerly initialize kernel communication channels on
26
+ import. This can lead to race conditions and ZMQ port conflicts when
27
+ multiple Jupyter kernels are started in parallel, such as during notebook
28
+ tests. By using __getattr__, we defer the import of TableWidget until it is
29
+ explicitly accessed, preventing premature initialization and avoiding port
30
+ collisions.
31
+ """
32
if name == "TableWidget":
33
try:
34
import anywidget # noqa
0 commit comments