John Vandenberg has uploaded a new change for review.

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

Change subject: Page.categories parameter withSortKey ignored
......................................................................

Page.categories parameter withSortKey ignored

The withSortKey parameter of Site.pagecategories has been marked as deprecated
since the method was first introduced.  However the method Page.categories
has an equivalent parameter which it passes to Site.pagecategories, only
for it to be ignored.

Raise NotImplementedError if withSortKey is enabled calling Page.categories.

Bug: 73561
Change-Id: I22ce77fb91c1f02b71dc028fe75178b1b40c1cde
---
M pywikibot/page.py
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/43/174143/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index bda181f..2d71d8a 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1341,8 +1341,12 @@
         @return: a generator that yields Category objects.
 
         """
-        return self.site.pagecategories(self, withSortKey=withSortKey,
-                                        step=step, total=total, 
content=content)
+        # FIXME: bug 73561: withSortKey is ignored by Site.pagecategories
+        if withSortKey:
+            raise NotImplementedError('withSortKey is not implemented')
+
+        return self.site.pagecategories(self, step=step, total=total,
+                                        content=content)
 
     def extlinks(self, step=None, total=None):
         """Iterate all external URLs (not interwiki links) from this page.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22ce77fb91c1f02b71dc028fe75178b1b40c1cde
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>

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

Reply via email to