From 766fcb7101d325af7c1158be28ba763356432879 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 19 Apr 2026 23:04:19 -0400 Subject: [PATCH] Fixes for newer Python/pymysql versions --- src/earwigbot/tasks/wikiproject_tagger.py | 3 ++- src/earwigbot/wiki/site.py | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/earwigbot/tasks/wikiproject_tagger.py b/src/earwigbot/tasks/wikiproject_tagger.py index c03811e..05151ee 100644 --- a/src/earwigbot/tasks/wikiproject_tagger.py +++ b/src/earwigbot/tasks/wikiproject_tagger.py @@ -72,7 +72,8 @@ class Job: not_in_category: str | None dry_run: bool - _counter: list[int] = [0] # Wrap to allow frozen updates + # Wrap to allow frozen updates + _counter: list[int] = field(default_factory=lambda: [0]) processed_cats: set[str] = field(default_factory=set) processed_pages: set[str] = field(default_factory=set) skip_pages: set[str] = field(default_factory=set) diff --git a/src/earwigbot/wiki/site.py b/src/earwigbot/wiki/site.py index 75f2a3d..ec148c1 100644 --- a/src/earwigbot/wiki/site.py +++ b/src/earwigbot/wiki/site.py @@ -710,10 +710,6 @@ class Site: args["read_default_file"] = os.path.expanduser("~/.my.cnf") elif "read_default_file" in args: args["read_default_file"] = os.path.expanduser(args["read_default_file"]) - if "autoping" not in args: - args["autoping"] = True - if "autoreconnect" not in args: - args["autoreconnect"] = True if pymysql is None: raise exceptions.SQLError(