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

JAnD created this task.Jul 14 2020, 8:29 AM
Restricted Application added subscribers: pywikibot-bugs-list, jeblad, Aklapper. · View Herald TranscriptJul 14 2020, 8:29 AM
Peachey88 updated the task description. (Show Details)Jul 14 2020, 9:02 AM
matej_suchanek added a subscriber: matej_suchanek.

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
Xqt added a subscriber: Xqt.Jul 14 2020, 6:13 PM

Pywikibot uses syntaxhighlight as alias for source.

JAnD added a comment.Jul 14 2020, 7:42 PM

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?

Xqt added a comment.Jul 15 2020, 2:11 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?

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 closed this task as Resolved.Nov 9 2020, 8:32 AM
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