jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/780890 )

Change subject: Revert "[IMPR] use pg.XMLDumpPageGenerator in replace.py"
......................................................................

Revert "[IMPR] use pg.XMLDumpPageGenerator in replace.py"

This reverts commit e28a0df38deb727a61984fe92b2c34e886b9d08f.
due to:

Bug: T306134
Change-Id: I62c2bbdbdc286ce78f823fd3571e11a6cdd33a49
---
M scripts/replace.py
1 file changed, 3 insertions(+), 6 deletions(-)

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



diff --git a/scripts/replace.py b/scripts/replace.py
index 7b748d3..104cbf5 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -153,7 +153,7 @@
 from pywikibot.backports import Dict, Generator, List, Pattern, Tuple
 from pywikibot.bot import ExistingPageBot, SingleSiteBot
 from pywikibot.exceptions import InvalidPageError, NoPageError
-from pywikibot.tools import chars, deprecated
+from pywikibot.tools import chars


 # This is required for the text that is shown when you run this script
@@ -382,7 +382,6 @@
         return _get_text_exceptions(self.fix_set.exceptions or {})


-@deprecated('pagegenerators.XMLDumpPageGenerator', since='7.1.0')
 class XmlDumpReplacePageGenerator:

     """
@@ -390,8 +389,6 @@

     These pages will be retrieved from a local XML dump file.

-    .. deprecated:: 7.1
-
     :param xmlFilename: The dump's path, either absolute or relative
     :param xmlStart: Skip all articles in the dump before this one
     :param replacements: A list of 2-tuples of original text (as a
@@ -1079,8 +1076,8 @@
     precompile_exceptions(exceptions, regex, flags)

     if xmlFilename:
-        gen = pagegenerators.XMLDumpPageGenerator(
-            xmlFilename, xmlStart, namespaces=genFactory.namespaces, site=site)
+        gen = XmlDumpReplacePageGenerator(xmlFilename, xmlStart,
+                                          replacements, exceptions, site)
     elif sql_query is not None:
         # Only -excepttext option is considered by the query. Other
         # exceptions are taken into account by the ReplaceRobot

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

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

Reply via email to