Thank you for the patch.
I suppose you speak about "Pygments" (not Sphinx).
Sphinx is not required by Docutils so the tests should be independent of the Sphinx version.
For Pygments (which is used, if installed, without version restrictions), the tests should pass with any Pygments version (either adapting or skipping test cases that are known to fail).
As such, the patch may fix the tests for some installations and break them for others.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the patch.
I suppose you speak about "Pygments" (not Sphinx).
Sphinx is not required by Docutils so the tests should be independent of the Sphinx version.
For Pygments (which is used, if installed, without version restrictions), the tests should pass with any Pygments version (either adapting or skipping test cases that are known to fail).
As such, the patch may fix the tests for some installations and break them for others.
Oh, sorry, you're right, the problem is with the latest pygments release, not Sphinx, I've messed this patch with another one.
This new patch should fix the issue, it has a conditional version checking to use the correct tests depending on the pygments version detected.
Last edit: Daniel Garcia Moreno 2023-01-24
A version of the patch with Pygments-version-dependent data is now applied to the repository.
Fixed in Docutils 0.20.
Thank you for reporting.
(Cf. [bugs:470] for open problems with Pygments 2.13)