Skip to content

Commit 9008dbb

Browse files
Carreauminrk
andauthored
TQDM workaround due to unresponsive maintainer (#1363)
Co-authored-by: Min RK <[email protected]>
1 parent 83b51a6 commit 9008dbb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ipykernel/zmqshell.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,18 @@ def subshell(self, arg_s):
472472
class ZMQInteractiveShell(InteractiveShell):
473473
"""A subclass of InteractiveShell for ZMQ."""
474474

475+
def __init__(self, *args, **kwargs):
476+
super().__init__(*args, **kwargs)
477+
478+
# tqdm has an incorrect detection of ZMQInteractiveShell when launch via
479+
# a scheduler that bypass IPKernelApp Think of JupyterHub cluster
480+
# spawners and co. as of end of Feb 2025, the maintainer has been
481+
# unresponsive for 5 months, to our fix, so we implement a workaround. I
482+
# don't like it but we have few other choices.
483+
# See https://github.com/tqdm/tqdm/pull/1628
484+
if "IPKernelApp" not in self.config:
485+
self.config.IPKernelApp.tqdm = "dummy value for https://github.com/tqdm/tqdm/pull/1628"
486+
475487
displayhook_class = Type(ZMQShellDisplayHook)
476488
display_pub_class = Type(ZMQDisplayPublisher)
477489
data_pub_class = Any() # type:ignore[assignment]

0 commit comments

Comments
 (0)