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

Change subject: [7.1.1] Fix regression of XmlDumpPageGenerator
......................................................................

[7.1.1] Fix regression of XmlDumpPageGenerator

Again use XmlDumpReplacePageGenerator instead of pg.XMLDumpPageGenerator
to allow preload filtering. This makes processing speed around 10,000
times faster.

This backports 3110a0a to stable.

Bug: T306134
Change-Id: I1107bfc5a29c9bac461274ec64d1920184e4fd05
---
M pywikibot/__metadata__.py
M scripts/replace.py
2 files changed, 4 insertions(+), 7 deletions(-)

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



diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py
index a8e7954..70cce75 100644
--- a/pywikibot/__metadata__.py
+++ b/pywikibot/__metadata__.py
@@ -11,7 +11,7 @@


 __name__ = 'pywikibot'
-__version__ = '7.1.0'
+__version__ = '7.1.1'
 __description__ = 'Python MediaWiki Bot Framework'
 __maintainer__ = 'The Pywikibot team'
 __maintainer_email__ = '[email protected]'
diff --git a/scripts/replace.py b/scripts/replace.py
index 2410c19..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/+/781565
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: stable
Gerrit-Change-Id: I1107bfc5a29c9bac461274ec64d1920184e4fd05
Gerrit-Change-Number: 781565
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