jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/622929 )
Change subject: [4.0] Remove Python 2 code from tools/__init__.py
......................................................................
[4.0] Remove Python 2 code from tools/__init__.py
iteritems, itervalues, iterkeys are dropped with Python 3.
Remove them in EmptyDefault class.
Change-Id: I8c74966d3e031f65614e0985d51bcfba259bb510
---
M pywikibot/tools/__init__.py
1 file changed, 1 insertion(+), 3 deletions(-)
Approvals:
Matěj Suchánek: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 15ec79f..c3f01c8 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -867,7 +867,7 @@
"""Initialise the default as an empty string."""
str.__init__(self)
- def _empty_iter(self):
+ def __iter__(self):
"""An iterator which does nothing and drops the
argument."""
return empty_iterator()
@@ -875,8 +875,6 @@
"""Raise always a L{CombinedError}."""
raise CombinedError(key)
- iteritems = itervalues = iterkeys = __iter__ = _empty_iter
-
EMPTY_DEFAULT = EmptyDefault()
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/622929
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: I8c74966d3e031f65614e0985d51bcfba259bb510
Gerrit-Change-Number: 622929
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged