diff --git a/news/sqlite-history-gc.rst b/news/sqlite-history-gc.rst new file mode 100644 index 0000000000..f722528bb8 --- /dev/null +++ b/news/sqlite-history-gc.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Fixed ``history gc`` invocation failing when ``sqlite`` history backend is used. + +**Security:** + +* diff --git a/xonsh/history/base.py b/xonsh/history/base.py index 6000b6c275..97128771ad 100644 --- a/xonsh/history/base.py +++ b/xonsh/history/base.py @@ -156,7 +156,7 @@ def info(self): """ raise NotImplementedError - def run_gc(self, size=None, blocking=True): + def run_gc(self, size=None, blocking=True, **_): """Run the garbage collector. Parameters diff --git a/xonsh/history/json.py b/xonsh/history/json.py index a9f2f7c5e2..b72f3de40b 100644 --- a/xonsh/history/json.py +++ b/xonsh/history/json.py @@ -585,7 +585,7 @@ def info(self): data["gc_last_size"] = f"{(self.hist_size, self.hist_units)}" return data - def run_gc(self, size=None, blocking=True, force=False): + def run_gc(self, size=None, blocking=True, force=False, **_): self.gc = JsonHistoryGC(wait_for_shell=False, size=size, force=force) if blocking: while self.gc.is_alive(): # while waiting for gc. diff --git a/xonsh/history/sqlite.py b/xonsh/history/sqlite.py index e17431b0ef..09e35c5729 100644 --- a/xonsh/history/sqlite.py +++ b/xonsh/history/sqlite.py @@ -382,7 +382,7 @@ def pull(self, show_commands=False): self.last_pull_time = time.time() return cnt - def run_gc(self, size=None, blocking=True): + def run_gc(self, size=None, blocking=True, **_): self.gc = SqliteHistoryGC(wait_for_shell=False, size=size) if blocking: while self.gc.is_alive():