Page MenuHomePhabricator

Do not raise SectionError in BasePage.get
Closed, ResolvedPublic

Description

BasePage.get should not raise SectionError since this method gets the text of the entire page, not a specific section.

The implementation does not align with MediaWiki's parser.

Details

Related Changes in Gerrit:

Event Timeline

Erroneous SectionErrors have broken my bot multiple times since the feature was introduced. There is no reasonable way to workaround the error in code and still get the page's text.

If SectionErrors continue to be raised, I will be forced to use a fork that reverts efea479 or otherwise override the entire method downstream. (I've implemented the latter, for now.)

Change #1328725 had a related patch set uploaded (by Mahveotm; author: Mahveotm):

[pywikibot/core@master] page: Do not validate sections in BasePage.get

https://gerrit.wikimedia.org/r/1328725

Change #1328725 merged by jenkins-bot:

[pywikibot/core@master] page: Do not validate sections in BasePage.get

https://gerrit.wikimedia.org/r/1328725

JJMC89 assigned this task to Mahveotm.
JJMC89 removed a project: Patch-For-Review.