Merlijn van Deen has uploaded a new change for review.

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


Change subject: Change Request from DictMixin to MutableMapping
......................................................................

Change Request from DictMixin to MutableMapping

Change-Id: Ieea4e11967642039dbe82cbadf26e90865153e9e
---
M pywikibot/data/api.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/52/90752/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 5f36019..c1aa077 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -9,7 +9,7 @@
 #
 __version__ = '$Id$'
 
-from UserDict import DictMixin
+from collections import MutableMapping
 from pywikibot.comms import http
 from email.mime.multipart import MIMEMultipart
 from email.mime.nonmultipart import MIMENonMultipart
@@ -64,7 +64,7 @@
     pass
 
 
-class Request(object, DictMixin):
+class Request(MutableMapping):
     """A request to a Site's api.php interface.
 
     Attributes of this object (except for the special parameters listed
@@ -163,6 +163,9 @@
     def __iter__(self):
         return self.params.__iter__()
 
+    def __len__(self):
+        return len(self.params)
+
     def iteritems(self):
         return self.params.iteritems()
 

-- 
To view, visit https://gerrit.wikimedia.org/r/90752
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieea4e11967642039dbe82cbadf26e90865153e9e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: python3
Gerrit-Owner: Merlijn van Deen <[email protected]>

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

Reply via email to