In the action API, there are two ways to parse a page/revision: using action=parse, or using the rvparse parameter to action=query&prop=revisions. Similarly, there are two ways to get a diff: using action=compare, or using parameters such as rvdiffto to action=query&prop=revisions. And then there's action=expandtemplates versus the rvexpandtemplates parameter to prop=revisions. This is a somewhat annoying bit of code duplication.
Further, the prop=revisions versions of these features have somewhat strange behavior. rvparse forces rvlimit=1. rvdiffto and related parameters will sometimes output "notcached" with no way to directly handle the situation.
So, I propose deprecating all of these parameters. The parameters that would be deprecated are the 'rvdifftotext', 'rvdifftotextpst', 'rvdiffto', 'rvexpandtemplates', 'rvgeneratexml', 'rvparse', and 'rvprop=parsetree' parameters to prop=revisions, and the similarly named parameters to prop=deletedrevisions, list=allrevisions, and list=alldeletedrevisions.
Following the normal action API deprecation policy, they'd output warnings but would continue to function until usage drops sufficiently or until it becomes too much trouble to fix them, and they wouldn't receive new feature development.
This would affect the following existing tasks:
- T157183: Merge action=compare into prop=revisions - Close as a duplicate of this task
- T28534: Tidy up, and refactor out common code in ApiParse/ApiQueryRevisions - Decline as irrelevant
- T31223: Querying for rvdiffto=prev fails for many revids: "notcached" - Decline as irrelevant
- T51353: Support Parser::PTD_FOR_INCLUSION mode in action=expandtemplates - Rewrite to apply to action=expandtemplates
- T20189: Request for &rvdiffprop in &prop=revisions to fetch diff info (size) - Rewrite to apply to action=compare
- T30047: Allow diff of deleted revisions with api - Rewrite to apply to action=compare, where it would probably be easier to implement
- T56328: Provide intraline diff format in API action=compare - Rewrite to apply to action=compare