I haven't tested this beyond "compiles with MinGW" and "Github actions",
but stared a bit at the code and it looks okay.
This can be considered a bugfix, so 2.6 as well.
Your patch has been applied to the master and release/2.6 branch.
commit 6cf7ce4eb33626b861031f965b35c3107d75e843 (master)
com
Thanks for digging into this and enlightening us non-rst-enlightened
mortals with the findings :-)
Lightly tested with GH Actions (I hope we actually do build the doc
stuff there ;-) ).
Your patch has been applied to the master and release/2.6 branch.
commit fafb05f6f3a7a1b46c278961ec8d2d8970f01