jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1154359?usp=email )

Change subject: IMPR: replace codecs.open with open in weblinkchecker.py
......................................................................

IMPR: replace codecs.open with open in weblinkchecker.py

Bug: T395187
Change-Id: I5c153c229c861db423690244044a72490e4218cd
---
M scripts/weblinkchecker.py
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index 05c061f..fef42f1 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -103,13 +103,12 @@
     python pwb.py weblinkchecker -repeat
 """
 #
-# (C) Pywikibot team, 2005-2024
+# (C) Pywikibot team, 2005-2025
 #
 # Distributed under the terms of the MIT license.
 #
 from __future__ import annotations

-import codecs
 import pickle
 import re
 import threading
@@ -378,7 +377,7 @@
             'deadlinks',
             f'results-{self.site.family.name}-{self.site.lang}.txt'
         )
-        with codecs.open(txtfilename, 'a', 'utf-8') as txtfile:
+        with open(txtfilename, 'a', encoding='utf-8') as txtfile:
             self.log_count += 1
             if self.log_count % 30 == 0:
                 # insert a caption

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1154359?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5c153c229c861db423690244044a72490e4218cd
Gerrit-Change-Number: 1154359
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to