XZise has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/186175

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/75/186175/1

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: newchange
Gerrit-Change-Id: If8b2c79f36525bc1c4437bed27c455d8e9f170aa
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to