Use in-memory IPython history.
This make IPython history saving in-memory to save a
thread on having to write to disk, and put a reminder that widgets leaks
detection has strong false positive if some other errors happen, and I
caught myself forgetting this several times.
@@ -11,6 +11,7 @@ import dask.threaded
import numpy as np
import pooch
import pytest
+from IPython.core.history import HistoryManager
from napari.components import LayerList
from napari.layers import Image, Labels, Points, Shapes, Vectors
@@ -381,3 +382,11 @@ if sys.version_info > (
if dask.threaded.default_pool is not None:
dask.threaded.default_pool.shutdown()
dask.threaded.default_pool = None
+
+
+# this is not the proper way to configure IPython, but it's an easy one.
+# This will prevent IPython to try to write history on its sql file and do
+# everything in memory.
+# 1) it saves a thread and
+# 2) it can prevent issues with slow or read-only file systems in CI.
+HistoryManager.enabled = False
