Page MenuHomePhabricator

Update TestProofreadPageValidSite.test_json_format to not use the deprecated `rvcontentformat` parameter
Closed, ResolvedPublic

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 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.

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.

Xqt lowered the priority of this task from Medium to Low.Jul 6 2023, 8:18 AM
Xqt claimed this task.
Xqt subscribed.

Haven't found this warning for a long time. Closing this.