MCPcopy Index your code
hub / github.com/ipython/ipython / _switch_to_memory_history

Method _switch_to_memory_history

IPython/core/history.py:721–729  ·  view source on GitHub ↗

Switch history storage to an in-memory SQLite database.

(self)

Source from the content-addressed store, hash-verified

719 )
720
721 def _switch_to_memory_history(self) -> None:
722 """Switch history storage to an in-memory SQLite database."""
723 try:
724 self.db.close()
725 except Exception:
726 pass
727 self.hist_file = ":memory:"
728 self.init_db()
729 self.new_session()
730
731 def __del__(self) -> None:
732 if self.save_thread is not None:

Callers 1

__init__Method · 0.95

Calls 3

new_sessionMethod · 0.95
init_dbMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected