--- pynest/nest/lib/hl_api_types.py.orig	2023-09-25 11:42:07.000000000 +0200
+++ pynest/nest/lib/hl_api_types.py	2024-03-11 21:51:09.866716541 +0100
@@ -553,6 +553,11 @@
             super().__setattr__(attr, val)
             return self.spatial
 
+        # IPython looks up this method when doing pretty printing
+        # without special casing this, this would go through SLI which is *slow*
+        if attr == "_ipython_canary_method_should_not_exist_":
+            raise KeyError(attr)
+
         # NumPy compatibility check:
         # raises AttributeError to tell NumPy that interfaces other than
         # __array__ are not available (otherwise get_parameters would be
