jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Extract pathname for python 2.7 too
......................................................................
[bugfix] Extract pathname for python 2.7 too
Solves unexprected AssertionError in bot.py
Bug: T89233
Change-Id: I07d55ba7082f54990f7ee33b48fca30a3776428d
---
M pywikibot/bot.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
John Vandenberg: Verified; Looks good to me, approved
Xqt: Verified
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index e255580..22e614f 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -107,13 +107,13 @@
"""Strip trailing newlines before outputting text to file."""
# Warnings captured from the warnings system are not processed by
# logoutput(), so the 'context' variables are missing.
- # The same context details are provided by Python 2.7, but need to
- # be extracted from the warning message for Python 2.6.
+ # The same context details are provided by Python 3.X, but need to
+ # be extracted from the warning message for Python <= 2.7.
if record.name == 'py.warnings' and 'caller_file' not in record.__dict__:
assert(len(record.args) == 1)
msg = record.args[0]
- if sys.version_info < (2, 7):
+ if sys.version_info[0] < 3:
record.pathname = msg.partition(':')[0]
record.lineno = msg.partition(':')[2].partition(':')[0]
record.module = msg.rpartition('/')[2].rpartition('.')[0]
--
To view, visit https://gerrit.wikimedia.org/r/189944
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I07d55ba7082f54990f7ee33b48fca30a3776428d
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
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: Do not change pipe links with r# choice
......................................................................
Do not change pipe links with r# choice
When there is a pipe link, r# as well as # choice options
shouldn't change it. # should always create a pipe link if there
isn't one (which is the given behaviour). But #r should not replace
an already given pipe link with the new target link only but keep
the link text.
Change-Id: I54cc7beec8d9a2037b28d4763dd57a44823fa457
---
M scripts/solve_disambiguation.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
Xqt: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index f25f617..0248094 100644
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -776,7 +776,7 @@
else:
if len(choice) > 0 and choice[0] == 'r':
# we want to throw away the original link text
- replaceit = True
+ replaceit = link_text == page_title
choice = choice[1:]
elif include == "redirect":
replaceit = True
--
To view, visit https://gerrit.wikimedia.org/r/176477
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I54cc7beec8d9a2037b28d4763dd57a44823fa457
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: Russell Blau <russblau(a)imapmail.org>
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: Enabling the error handling in decode method.
......................................................................
Enabling the error handling in decode method.
Enabled python implementation of error handling for the decode method of
HttpRequest. It accepts the "errors" argument which can
take the values like 'strict', 'replace' and 'ignore' according to need.
'strict' is the default value.
Bug: T88928
Change-Id: I02609a5abcdf0e5e66bbb4ffdcc41aaf74d5c943
---
M pywikibot/comms/threadedhttp.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
XZise: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py
index b7a7422..a2f6ef3 100644
--- a/pywikibot/comms/threadedhttp.py
+++ b/pywikibot/comms/threadedhttp.py
@@ -477,9 +477,9 @@
raise self._encoding
return self._encoding
- def decode(self, encoding):
+ def decode(self, encoding, errors='strict'):
"""Return the decoded response."""
- return self.raw.decode(self.encoding)
+ return self.raw.decode(encoding, errors)
@property
def content(self):
--
To view, visit https://gerrit.wikimedia.org/r/189975
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I02609a5abcdf0e5e66bbb4ffdcc41aaf74d5c943
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Maverick <manpreetkaur9411(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>