Page MenuHomePhabricator

replace <source> by <syntaxhighlight> in pywikibot scripts
Closed, ResolvedPublic

Description

<source> is obsolete See T237267, but in pywikibot are still only source keywords eg.

exceptions = ['comment', 'math', 'nowiki', 'pre', 'startspace',
                'source', 'table']

Event Timeline

matej_suchanek subscribed.

We should consider backward compatibility both for code and for older MediaWikis, and maybe waiting for T251116. Removing SyntaxHighlight as this task requires no change to the extension.

matej_suchanek renamed this task from replace <source> by <syntaxhighlightt> in pywikibot scripts to replace <source> by <syntaxhighlight> in pywikibot scripts.Jul 14 2020, 11:01 AM

Pywikibot uses syntaxhighlight as alias for source.

Pywikibot uses syntaxhighlight as alias for source.

Really? I found this word only in 4 files.

And what about exceptions in cosmetic_changes.py as stated above?

Pywikibot uses syntaxhighlight as alias for source.

Pywikibot uses syntaxhighlight as alias for source.

Really? I found this word only in 4 files.

And what about exceptions in cosmetic_changes.py as stated above?

Yes I am. See textlib.py line 342+ and the corresponding textlib.replaceexept https://codesearch.wmcloud.org/pywikibot/?q=syntaxhighlight&i=nope&files=&repos=
Probably we can change the usage vice versa but waiting for T251116 is appropriate then.

Xqt changed the task status from Open to Stalled.Sep 10 2020, 6:31 AM

Change 636004 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] replace 'source' exception regex with 'syntaxhighlight'

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

Xqt changed the task status from Stalled to Open.Oct 23 2020, 11:53 AM
Xqt triaged this task as Lowest priority.
Xqt claimed this task.

Change 636004 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] replace 'source' exception regex with 'syntaxhighlight'

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