[issue46127] Missing HTML span element in exceptions.html

Daniel Diniz report at bugs.python.org
Sun Dec 19 09:23:41 EST 2021


Daniel Diniz <ajaksu at gmail.com> added the comment:

That happens because EncodingWarning isn't highlighted as an Exception by Pygments[0]. The doc page gets its exceptions diagram by:
".. literalinclude:: ../../Lib/test/exception_hierarchy.txt"
and all other entries are recognized by Pygments, so we get the "ne" class for them.

A PR for Pygments adding EncodingWarning could be interesting, but I'm not sure the doc build process would pick it up and fix the 3.10 docs issue.

For 3.11, the diagram drawing was changed so no highlighting happens anymore, which fixes the issue for us in the long run.

[0] https://github.com/pygments/pygments/blob/8630e033313647d9579e314f3e8e2882f4558933/pygments/lexers/python.py#L225

----------
nosy: +ajaksu2

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46127>
_______________________________________


More information about the Python-bugs-list mailing list