Skip to content

Commit 50d4db0

Browse files
Carreauminrk
authored andcommitted
TQDM workaround due to unresponsive maintainer (#1363)
Co-authored-by: Min RK <[email protected]>
1 parent 9c9fbc6 commit 50d4db0

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
@@ -468,6 +468,18 @@ def subshell(self, arg_s):
468468
class ZMQInteractiveShell(InteractiveShell):
469469
"""A subclass of InteractiveShell for ZMQ."""
470470

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

0 commit comments

Comments
 (0)