jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/639530 )
Change subject: [doc] Update ROADMAP.rst
......................................................................
[doc] Update ROADMAP.rst
Change-Id: I783e908eddc693fe24d057699aed35ecc0bfad5a
---
M ROADMAP.rst
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ROADMAP.rst b/ROADMAP.rst
index e6c246c..8bee61b 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,6 +1,13 @@
Current release changes
~~~~~~~~~~~~~~~~~~~~~~~
+* Fix get_known_families() for wikipedia_family (T267196)
+* Move _InterwikiMap class to site/_interwikimap.py
+* instantiate a CosmeticChangesToolkit by passing a page
+* Create a Site from sitename
+* pywikibot.Site() parameters "interface" and "url" must be keyworded
+* Lookup the code parameter in xdict first (T255917)
+* Remove interwiki_forwarded_from list from family files (T104125)
* Rewrite Revision class; each data can be accessed either by key or as an attribute (T102735, T259428)
* L10N-Updates
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/639530
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: I783e908eddc693fe24d057699aed35ecc0bfad5a
Gerrit-Change-Number: 639530
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/639909 )
Change subject: [IMPR] deprecate site arg in CategoryFilterPageGenerator
......................................................................
[IMPR] deprecate site arg in CategoryFilterPageGenerator
Site arg can be obtained by the page itself.
Change-Id: I7923403be884bf87d3fbc9befde0c438e62b6c59
---
M pywikibot/pagegenerators.py
M tests/pagegenerators_tests.py
2 files changed, 5 insertions(+), 6 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 5b45c62..080fe3b 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -571,7 +571,7 @@
if self.catfilter_list:
dupfiltergen = CategoryFilterPageGenerator(
- dupfiltergen, self.catfilter_list, self.site)
+ dupfiltergen, self.catfilter_list)
if (preload or self.articlefilter_list) and not self.nopreload:
if isinstance(dupfiltergen, DequeGenerator):
@@ -1833,7 +1833,8 @@
yield page
-def CategoryFilterPageGenerator(generator, category_list, site=None):
+@deprecated_args(site=None, since='20201107')
+def CategoryFilterPageGenerator(generator, category_list):
"""
Wrap a generator to filter pages by categories specified.
@@ -1842,10 +1843,8 @@
@type category_list: list of category objects
"""
- if site is None:
- site = pywikibot.Site()
for page in generator:
- if all(x in site.pagecategories(page) for x in category_list):
+ if all(x in page.categories() for x in category_list):
yield page
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 7010ee2..3524234 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -236,7 +236,7 @@
site = self.site
gen = pagegenerators.PagesFromTitlesGenerator(self.titles, site)
gen = pagegenerators.CategoryFilterPageGenerator(
- gen, self.catfilter_list, site)
+ gen, self.catfilter_list)
self.assertLength(tuple(gen), 10)
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/639909
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: I7923403be884bf87d3fbc9befde0c438e62b6c59
Gerrit-Change-Number: 639909
Gerrit-PatchSet: 2
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Hazard-SJ <hazardsjwiki(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged