Extension:SyntaxHighlight/Updating pygments

From mediawiki.org

To update the version of Pygments, follow the following instructions.

On Wikimedia sites[edit]

Since T320848, Pygments is installed in the Blubber generated container image by directly fetching a built wheel from PyPi. The version of Pygments installed is managed in the syntaxhighlight/requirements.txt file. This file should pin to a specific version matching the version embedded in the extension and use a sha256 hash to verify the downloaded wheel. See https://pip.pypa.io/en/stable/topics/secure-installs/ for more information on hash-checking.

Rebuild the Shellbox container and update the image version for the shellbox-syntaxhighlight deployment. And then deploy it. It'll take roughly an hour for Special:Version to update, triggering cache invalidation of all highlighted content.

The resulting container image expects callers to use $wgPygmentizePath = '/srv/app/pygmentize'; to specify the location of the pygmentize script.

Bundled copy[edit]

In a checkout of the SyntaxHighlight git repo, run ./pygments/create_pygmentize_bundle. Then run the maintenance scripts updateCSS.php and updateLexerList.php and commit the result.