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

Method name_session

IPython/core/history.py:787–798  ·  view source on GitHub ↗

Give the current session a name in the history database.

(self, name: str)

Source from the content-addressed store, hash-verified

785 self.session_number = 0
786
787 def name_session(self, name: str) -> None:
788 """Give the current session a name in the history database."""
789 warn(
790 "name_session is deprecated in IPython 9.0 and will be removed in future versions",
791 DeprecationWarning,
792 stacklevel=2,
793 )
794 with self.db:
795 self.db.execute(
796 "UPDATE sessions SET remark=? WHERE session==?",
797 (name, self.session_number),
798 )
799
800 def reset(self, new_session: bool = True) -> None:
801 """Clear the session history, releasing all object references, and

Callers

nothing calls this directly

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected