jenkins-bot has submitted this change and it was merged.
Change subject: [IMPROV] ModuleDeprecationWrapper is module
......................................................................
[IMPROV] ModuleDeprecationWrapper is module
It is a replacement for modules so it should be subclass of module. Also
sorted the imports alphabetically.
Change-Id: If8b2c79f36525bc1c4437bed27c455d8e9f170aa
---
M pywikibot/tools.py
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools.py b/pywikibot/tools.py
index 0eb772e..3d45090 100644
--- a/pywikibot/tools.py
+++ b/pywikibot/tools.py
@@ -8,12 +8,13 @@
from __future__ import print_function
__version__ = '$Id$'
+import collections
+import inspect
+import re
import sys
import threading
import time
-import inspect
-import re
-import collections
+import types
from distutils.version import Version
if sys.version_info[0] > 2:
@@ -878,7 +879,7 @@
return call
-class ModuleDeprecationWrapper(object):
+class ModuleDeprecationWrapper(types.ModuleType):
"""A wrapper for a module to deprecate classes or variables of
it."""
--
To view, visit
https://gerrit.wikimedia.org/r/186175
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If8b2c79f36525bc1c4437bed27c455d8e9f170aa
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>