jenkins-bot has submitted this change and it was merged.
Change subject: Update revId upon claim change
......................................................................
Update revId upon claim change
changeTarget, removeSources: Prevents edit conflicts
addSources: No need to set every time through the loop
Change-Id: I2d8b69a3894aaf6d58a62ecba48f5dc584617e82
---
M pywikibot/page.py
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 2c697c0..68c8dff 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4259,6 +4259,7 @@
**kwargs)
# TODO: Re-create the entire item from JSON, not just id
self.snak = data['claim']['id']
+ self.on_item.latest_revision_id = data['pageinfo']['lastrevid']
def getTarget(self):
"""
@@ -4338,10 +4339,10 @@
@type claims: list of pywikibot.Claim
"""
data = self.repo.editSource(self, claims, new=True, **kwargs)
+ self.on_item.latest_revision_id = data['pageinfo']['lastrevid']
source = defaultdict(list)
for claim in claims:
claim.hash = data['reference']['hash']
- self.on_item.latest_revision_id = data['pageinfo']['lastrevid']
source[claim.getID()].append(claim)
self.sources.append(source)
@@ -4361,7 +4362,8 @@
@param sources: the sources to remove
@type sources: list of pywikibot.Claim
"""
- self.repo.removeSources(self, sources, **kwargs)
+ data = self.repo.removeSources(self, sources, **kwargs)
+ self.on_item.latest_revision_id = data['pageinfo']['lastrevid']
for source in sources:
source_dict = defaultdict(list)
source_dict[source.getID()].append(source)
--
To view, visit https://gerrit.wikimedia.org/r/239572
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2d8b69a3894aaf6d58a62ecba48f5dc584617e82
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil <lokal.profil(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Remove deprecation of returndict
......................................................................
[FIX] Remove deprecation of returndict
In bb29dafe the parameter `returndict` of `APISite.newpages` has been
deprecated and is replaced by nothing. But the function still supports that
parameter.
Change-Id: Iaadce9c3f8eca22c4fb9d7277b83b43eea66e655
---
M pywikibot/site.py
1 file changed, 0 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 9aaceed..8aa221a 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -5767,7 +5767,6 @@
@deprecated_args(number='total',
repeat=None,
namespace="namespaces",
- returndict=None,
rcshow=None,
rc_show=None,
get_redirect=None)
--
To view, visit https://gerrit.wikimedia.org/r/239558
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaadce9c3f8eca22c4fb9d7277b83b43eea66e655
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] site_tests: Expect long if necessary
......................................................................
[FIX] site_tests: Expect long if necessary
On the appveyor Windows builds, the maximum int number is to low to represent
the timestamp in an int and it uses a long. But the test explicitly requires an
int which is technically not possible.
Bug: T113146
Change-Id: I7c054c55cbb3334eed14faabdb09a69cbb18b48c
---
M tests/site_tests.py
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 2b41257..26227d0 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -22,8 +22,11 @@
from pywikibot import config
from pywikibot import async_request, page_put_queue
from pywikibot.comms import http
-from pywikibot.tools import MediaWikiVersion
from pywikibot.data import api
+from pywikibot.tools import (
+ MediaWikiVersion,
+ PY2,
+)
from tests.aspects import (
unittest, TestCase, DeprecationTestCase,
@@ -1062,7 +1065,8 @@
self.assertIsInstance(entry, tuple)
self.assertIsInstance(entry[0], pywikibot.Page)
self.assertIsInstance(entry[1], basestring)
- self.assertIsInstance(entry[2], int)
+ self.assertIsInstance(
+ entry[2], long if PY2 and entry[2] > sys.maxint else int) # noqa
self.assertIsInstance(entry[3], basestring)
def test_logpages_dump(self):
--
To view, visit https://gerrit.wikimedia.org/r/239566
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7c054c55cbb3334eed14faabdb09a69cbb18b48c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #2871
Status: Failed
Duration: 30 minutes and 3 seconds
Commit: 1abc3fb (master)
Author: Fabian Neundorf
Message: [FIX] editor: Close temporary file handle
When using `mkstemp` the file handle must be closed before removing the file.
This was first fixed with 3a4d1844 but the `editor` module also uses `mkstemp`
and is not closing the handle.
Change-Id: I773aff3000fa26b04dcc9b5151fe11a726c0247c
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/506deae2118c...1abc3fb9…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/81161362
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications