diff --git a/IPython/core/history.py b/IPython/core/history.py index c81592a2c8f..fb67d158ef9 100644 --- a/IPython/core/history.py +++ b/IPython/core/history.py @@ -574,7 +574,7 @@ def new_session(self, conn=None): cur = conn.execute( """INSERT INTO sessions VALUES (NULL, ?, NULL, NULL, '') """, - (datetime.datetime.now(),), + (datetime.datetime.now().isoformat(" "),), ) self.session_number = cur.lastrowid @@ -582,9 +582,15 @@ def end_session(self): """Close the database session, filling in the end time and line count.""" self.writeout_cache() with self.db: - self.db.execute("""UPDATE sessions SET end=?, num_cmds=? WHERE - session==?""", (datetime.datetime.now(), - len(self.input_hist_parsed)-1, self.session_number)) + self.db.execute( + """UPDATE sessions SET end=?, num_cmds=? WHERE + session==?""", + ( + datetime.datetime.now().isoformat(" "), + len(self.input_hist_parsed) - 1, + self.session_number, + ), + ) self.session_number = 0 def name_session(self, name): diff --git a/IPython/core/logger.py b/IPython/core/logger.py index eeaba2429c4..ab12d10e229 100644 --- a/IPython/core/logger.py +++ b/IPython/core/logger.py @@ -20,7 +20,6 @@ import time - # prevent jedi/parso's debug messages pipe into interactiveshell logging.getLogger("parso").setLevel(logging.WARNING)