Daniel Diniz <aja...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue46127>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to