Skip to content

Commit

Permalink
Update ipykernel/ipkernel.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau authored Feb 12, 2025
1 parent 3efdf9d commit 7a01d06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ipykernel/ipkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ def __init__(self, **kwargs):
self._new_threads_parent_header = {}
self._initialize_thread_hooks()

gc.callbacks.append(self._clean_thread_parent_frames)
if hasattr(gc, "callbacks"):
# while `gc.callbacks` exists since Python 3.3, pypy does not
# implement it even as of 3.10.
gc.callbacks.append(self._clean_thread_parent_frames)

help_links = List(
[
Expand Down

0 comments on commit 7a01d06

Please sign in to comment.