I think the MockAwareDoctestFinder code from https://github.com/thisch/pytest-sphinx/blob/0e4ec60b720ba8d6afd1cf24e2a20e3ba8d6dd4f/pytest_sphinx.py#L494
can be removed (once we drop support for < python 3.10), because the issue we had with it has been fixed (I guess)
https://bugs.python.org/issue35753
Once we have python3.10 in the CI, we can try to check if this code is no longer needed.
I think the MockAwareDoctestFinder code from https://github.com/thisch/pytest-sphinx/blob/0e4ec60b720ba8d6afd1cf24e2a20e3ba8d6dd4f/pytest_sphinx.py#L494
can be removed (once we drop support for < python 3.10), because the issue we had with it has been fixed (I guess)
https://bugs.python.org/issue35753
Once we have python3.10 in the CI, we can try to check if this code is no longer needed.