Skip to content
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

TQDM workaround due to unresponsive maintainer #1363

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ipykernel/zmqshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,18 @@ def subshell(self, arg_s):
class ZMQInteractiveShell(InteractiveShell):
"""A subclass of InteractiveShell for ZMQ."""

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

# tqdm has an incorrect detection of ZMQInteractiveShell when launch via
# a scheduler that bypass IPKernelApp Think of JupyterHub cluster
# spawners and co. as of end of Feb 2025, the maintainer has been
# unresponsive for 5 months, to our fix, so we implement a workaround. I
# don't like it but we have few other choices.
# See https://github.com/tqdm/tqdm/pull/1628
if "IPKernelApp" not in self.config:
self.config.IPKernelApp.tqdm = "dummy value for https://github.com/tqdm/tqdm/pull/1628"

displayhook_class = Type(ZMQShellDisplayHook)
display_pub_class = Type(ZMQDisplayPublisher)
data_pub_class = Any() # type:ignore[assignment]
Expand Down
Loading