jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/617798 )
Change subject: Skip data_dict if it does not contain a 'title' attribute.
......................................................................
Skip data_dict if it does not contain a 'title' attribute.
Change-Id: I6d444570abf555e8a6882a99694cc864627a19f9
---
M pywikibot/data/api.py
1 file changed, 8 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 11b8826..a5855af 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -3000,9 +3000,14 @@
for data_dict in super(PropertyGenerator, self)._extract_results(
resultdata
):
- d = self._previous_dicts.setdefault(data_dict['title'], data_dict)
- if d is not data_dict:
- self._update_old_result_dict(d, data_dict)
+ if 'title' in data_dict:
+ d = self._previous_dicts.setdefault(data_dict['title'],
+ data_dict)
+ if d is not data_dict:
+ self._update_old_result_dict(d, data_dict)
+ else:
+ pywikibot.warn('Skipping result without title: '
+ + str(data_dict))
def _fully_retrieved_data_dicts(self, resultdata):
"""Yield items of self._previous_dicts that are not in resultdata."""
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/617798
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: I6d444570abf555e8a6882a99694cc864627a19f9
Gerrit-Change-Number: 617798
Gerrit-PatchSet: 2
Gerrit-Owner: Russell Blau <russblau(a)imapmail.org>
Gerrit-Reviewer: Legoktm <legoktm(a)member.fsf.org>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Multichill <maarten(a)mdammers.nl>
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/+/618324 )
Change subject: [Fix] Fix stable version to 4.0.0 tag
......................................................................
[Fix] Fix stable version to 4.0.0 tag
Change-Id: I441cccef90675670f24c7ca7d8fd4211f1683a41
---
M HISTORY.rst
M ROADMAP.rst
M pywikibot/__metadata__.py
3 files changed, 23 insertions(+), 29 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index a45f674..57bb03f 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,33 +1,6 @@
Release history
===============
-4.0.0
------
-
-* Read correct object in SiteLinkCollection.normalizeData (T259426)
-* tools.count and tools classes Counter, OrderedDict and ContextManagerWrapper were removed
-* Deprecate UnicodeMixin and IteratorNextMixin
-* Restrict site module interface
-* EventStreams "since" parameter settings has been fixed
-* Unsupported debug and uploadByUrl parameters of UploadRobot were removed
-* Unported compat decode parameter of Page.title() has been removed
-* Wikihow family file was added (T249814)
-* Improve performance of CosmeticChangesToolkit.translateMagicWords
-* Prohibit positional arguments with Page.title()
-* Functions dealing with stars list were removed
-* Some pagegenerators functions were deprecated which should be replaced by site generators
-* LogEntry became a UserDict; all content can be accessed by its key
-* URLs for new toolforge.org domain were updated
-* pywikibot.__release__ was deprecated
-* Use one central point for framework version (T106121, T171886, T197936, T253719)
-* rvtoken parameter of Site.loadrevisions() and Page.revisions() has been dropped (T74763)
-* getFilesFromAnHash and getImagesFromAnHash Site methods have been removed
-* Site and Page methods deprecated for 10 years or longer have been removed
-* Support for Python 2 and 3.4 has been dropped (T213287, T239542)
-* Bugfixes and improvements
-* Localisation updates
-
-
3.0.20200703
------------
diff --git a/ROADMAP.rst b/ROADMAP.rst
index 0c86197..c788ddc 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,7 +1,28 @@
Current release
~~~~~~~~~~~~~~~
-* (no changes yet)
+* Read correct object in SiteLinkCollection.normalizeData (T259426)
+* tools.count and tools classes Counter, OrderedDict and ContextManagerWrapper were removed
+* Deprecate UnicodeMixin and IteratorNextMixin
+* Restrict site module interface
+* EventStreams "since" parameter settings has been fixed
+* Unsupported debug and uploadByUrl parameters of UploadRobot were removed
+* Unported compat decode parameter of Page.title() has been removed
+* Wikihow family file was added (T249814)
+* Improve performance of CosmeticChangesToolkit.translateMagicWords
+* Prohibit positional arguments with Page.title()
+* Functions dealing with stars list were removed
+* Some pagegenerators functions were deprecated which should be replaced by site generators
+* LogEntry became a UserDict; all content can be accessed by its key
+* URLs for new toolforge.org domain were updated
+* pywikibot.__release__ was deprecated
+* Use one central point for framework version (T106121, T171886, T197936, T253719)
+* rvtoken parameter of Site.loadrevisions() and Page.revisions() has been dropped (T74763)
+* getFilesFromAnHash and getImagesFromAnHash Site methods have been removed
+* Site and Page methods deprecated for 10 years or longer have been removed
+* Support for Python 2 and 3.4 has been dropped (T213287, T239542)
+* Bugfixes and improvements
+* Localisation updates
Future releases
~~~~~~~~~~~~~~~
diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py
index 70bcaad..9af03d5 100644
--- a/pywikibot/__metadata__.py
+++ b/pywikibot/__metadata__.py
@@ -6,7 +6,7 @@
# Distributed under the terms of the MIT license.
#
__name__ = 'pywikibot'
-__version__ = '4.0.1.dev0'
+__version__ = '4.0.0'
__description__ = 'Python MediaWiki Bot Framework'
__maintainer__ = 'The Pywikibot team'
__maintainer_email__ = 'pywikibot(a)lists.wikimedia.org'
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/618324
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: stable
Gerrit-Change-Id: I441cccef90675670f24c7ca7d8fd4211f1683a41
Gerrit-Change-Number: 618324
Gerrit-PatchSet: 1
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/+/618247 )
Change subject: Prepare next release
......................................................................
Prepare next release
Change-Id: I6e58121401a456a412a5dfcf605a78a31f9b701f
---
M HISTORY.rst
M ROADMAP.rst
M pywikibot/__metadata__.py
3 files changed, 29 insertions(+), 23 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/HISTORY.rst b/HISTORY.rst
index 57bb03f..a45f674 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,33 @@
Release history
===============
+4.0.0
+-----
+
+* Read correct object in SiteLinkCollection.normalizeData (T259426)
+* tools.count and tools classes Counter, OrderedDict and ContextManagerWrapper were removed
+* Deprecate UnicodeMixin and IteratorNextMixin
+* Restrict site module interface
+* EventStreams "since" parameter settings has been fixed
+* Unsupported debug and uploadByUrl parameters of UploadRobot were removed
+* Unported compat decode parameter of Page.title() has been removed
+* Wikihow family file was added (T249814)
+* Improve performance of CosmeticChangesToolkit.translateMagicWords
+* Prohibit positional arguments with Page.title()
+* Functions dealing with stars list were removed
+* Some pagegenerators functions were deprecated which should be replaced by site generators
+* LogEntry became a UserDict; all content can be accessed by its key
+* URLs for new toolforge.org domain were updated
+* pywikibot.__release__ was deprecated
+* Use one central point for framework version (T106121, T171886, T197936, T253719)
+* rvtoken parameter of Site.loadrevisions() and Page.revisions() has been dropped (T74763)
+* getFilesFromAnHash and getImagesFromAnHash Site methods have been removed
+* Site and Page methods deprecated for 10 years or longer have been removed
+* Support for Python 2 and 3.4 has been dropped (T213287, T239542)
+* Bugfixes and improvements
+* Localisation updates
+
+
3.0.20200703
------------
diff --git a/ROADMAP.rst b/ROADMAP.rst
index c788ddc..0c86197 100644
--- a/ROADMAP.rst
+++ b/ROADMAP.rst
@@ -1,28 +1,7 @@
Current release
~~~~~~~~~~~~~~~
-* Read correct object in SiteLinkCollection.normalizeData (T259426)
-* tools.count and tools classes Counter, OrderedDict and ContextManagerWrapper were removed
-* Deprecate UnicodeMixin and IteratorNextMixin
-* Restrict site module interface
-* EventStreams "since" parameter settings has been fixed
-* Unsupported debug and uploadByUrl parameters of UploadRobot were removed
-* Unported compat decode parameter of Page.title() has been removed
-* Wikihow family file was added (T249814)
-* Improve performance of CosmeticChangesToolkit.translateMagicWords
-* Prohibit positional arguments with Page.title()
-* Functions dealing with stars list were removed
-* Some pagegenerators functions were deprecated which should be replaced by site generators
-* LogEntry became a UserDict; all content can be accessed by its key
-* URLs for new toolforge.org domain were updated
-* pywikibot.__release__ was deprecated
-* Use one central point for framework version (T106121, T171886, T197936, T253719)
-* rvtoken parameter of Site.loadrevisions() and Page.revisions() has been dropped (T74763)
-* getFilesFromAnHash and getImagesFromAnHash Site methods have been removed
-* Site and Page methods deprecated for 10 years or longer have been removed
-* Support for Python 2 and 3.4 has been dropped (T213287, T239542)
-* Bugfixes and improvements
-* Localisation updates
+* (no changes yet)
Future releases
~~~~~~~~~~~~~~~
diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py
index 9af03d5..70bcaad 100644
--- a/pywikibot/__metadata__.py
+++ b/pywikibot/__metadata__.py
@@ -6,7 +6,7 @@
# Distributed under the terms of the MIT license.
#
__name__ = 'pywikibot'
-__version__ = '4.0.0'
+__version__ = '4.0.1.dev0'
__description__ = 'Python MediaWiki Bot Framework'
__maintainer__ = 'The Pywikibot team'
__maintainer_email__ = 'pywikibot(a)lists.wikimedia.org'
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/618247
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: I6e58121401a456a412a5dfcf605a78a31f9b701f
Gerrit-Change-Number: 618247
Gerrit-PatchSet: 1
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/+/618043 )
Change subject: [bugfix] Only mention archives where something was really archived
......................................................................
[bugfix] Only mention archives where something was really archived
Avoid mentioning archives which were loaded but nothing was archived
there (e.g., for being full).
Change-Id: Iac870d0e80f3ee3d5f4e9b1c47f10e7048b45a07
---
M scripts/archivebot.py
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 292f35d..0e85bfc 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -787,9 +787,10 @@
self.page.header = rx.sub(self.attr2text(), self.page.header)
self.comment_params['count'] = self.archived_threads
comma = self.site.mediawiki_message('comma-separator')
- self.comment_params['archives'] \
- = comma.join(a.title(as_link=True)
- for a in self.archives.values())
+ self.comment_params['archives'] = comma.join(
+ a.title(as_link=True) for a in self.archives.values()
+ if a.archived_threads > 0
+ )
# Find out the reasons and return them localized
translated_whys = set()
for why, arg in whys:
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/618043
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: Iac870d0e80f3ee3d5f4e9b1c47f10e7048b45a07
Gerrit-Change-Number: 618043
Gerrit-PatchSet: 3
Gerrit-Owner: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged