Writing with my apologies as the author/originator of this bug in the upstream codebase (it is a side-effect of a copyright-related changeset[1]).
I seemingly-independently wrote a patch today to resolve the cause that I've opened as a pull request[2] upstream -- but I have to admit that I _did_ read through this bugthread yesterday before doing that -- and my patch happens to be near-identical to Colin's, which may be coincidence, or may not. Given Dmitry's changelog entry update, it seems no actual code change is required in Debian, but even so I think it might be nice to improve the correctness of the test case upstream, and so I'll continue to participate in the discussion there. [1] - https://github.com/sphinx-doc/sphinx/pull/12516 [2] - https://github.com/sphinx-doc/sphinx/pull/13224