Page MenuHomePhabricator

Update TestProofreadPageValidSite.test_json_format to not use the deprecated `rvcontentformat` parameter
Open, MediumPublic

Description

tests.proofreadpage_tests.TestProofreadPageValidSite.test_json_format uses rvcontentformat (T138441) which is deprecated since MW 1.32 (T200955).

As it stands we get the following warnings from API:

WARNING: API warning (revisions): The parameter "rvcontentformat" has been deprecated.
WARNING: API warning (revisions): Because "rvslots" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used.

(The QueryGenerator does not add rvslots autoamatically because it is not compatible with rvcontentformat, see T205210)

Event Timeline

Dalba created this task.Sep 23 2018, 1:21 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptSep 23 2018, 1:21 PM
Dalba renamed this task from Update proofreadpage.py to not use the deprecated rvcontentformat parameter to Update proofreadpage.py to not use the deprecated `contentformat` parameter.Sep 23 2018, 1:27 PM
Xqt triaged this task as Medium priority.Sep 23 2018, 7:35 PM
Xqt removed a project: Pywikibot-Scripts.
Mpaa added a subscriber: Mpaa.Nov 23 2018, 9:58 PM

This is not correct.
proofreadpage.py uses "contentformat" in edit action, which is not deprecated. See https://en.wikisource.org/w/api.php?action=help&modules=edit

"rvcontentformat" is only used in tests, to retrieve a page in json format to test _page_to_json() method.

So, IMO, this is invalid.

Dalba renamed this task from Update proofreadpage.py to not use the deprecated `contentformat` parameter to Update TestProofreadPageValidSite.test_json_format to not use the deprecated `rvcontentformat` parameter.EditedFeb 5 2019, 10:22 AM
Dalba updated the task description. (Show Details)

This is not correct.
proofreadpage.py uses "contentformat" in edit action, which is not deprecated. See https://en.wikisource.org/w/api.php?action=help&modules=edit
"rvcontentformat" is only used in tests, to retrieve a page in json format to test _page_to_json() method.
So, IMO, this is invalid.

Then the test needs to be rewritten somehow, hopefully before that parameter is removed from MW API. Task description updated.