jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/372827 )
Change subject: [bugfix] hash for LogEntry should be unique
......................................................................
[bugfix] hash for LogEntry should be unique
Per https://docs.python.org/3.4/reference/datamodel.html#object.__hash__ :
"it is advised to somehow mix together (e.g. using exclusive or) the hash
values for the components of the object that also play a part in comparison
of objects."
Bug: T173688
Change-Id: If124e1bf61e23543b8972ff65f75094c0bdd255c
---
M pywikibot/logentries.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index 26dd3cf..3b4b768 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -56,8 +56,8 @@
self.data._type = self.type()
def __hash__(self):
- """Return the id as the hash."""
- return self.logid()
+ """Combine site and logid as the hash."""
+ return self.logid() ^ hash(self.site)
@property
def _params(self):
--
To view, visit https://gerrit.wikimedia.org/r/372827
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If124e1bf61e23543b8972ff65f75094c0bdd255c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #4255
Status: Errored
Duration: 3 hours, 53 minutes, and 11 seconds
Commit: 60c3013 (master)
Author: dalba
Message: travis.yml: Print the length and type of config.authenticate values
This is a temporary means to help us confirm that authenticate values are
initially set with correct type and format in user-config.py (or not).
Bug: T173498
Change-Id: I7b6f057477ec5793c33e0e5d3bd02a2e0a677e8d
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/41ed1c00f74f...60c30136…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/266461971?utm_source=…
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications