build: make docs/conf.py compatible with py3

I don't even know what this file does, but it made our Debian build
fail on py3 because it attempted to pass unicode to
`mercurial.ui.setconfig()`.
7 jobs for topic/default/debian-py3 in 8 minutes (queued for 26 seconds)
latest
Status Job ID Name Coverage
  Test
failed #62663
doc

00:00:22

passed #62657
flake8

00:00:22

manual #62658
allowed to fail manual
pytype
passed #62659
tests-py2-cext

00:05:21

passed #62660
tests-py2-pure

00:03:18

passed #62661
tests-py3-cext

00:05:44

passed #62662
tests-py3-pure

00:05:27

 
Name Stage Failure
failed
doc Test
    raise TypeError(r"expect str, not %s" % type(filename).__name__)
TypeError: expect str, not unicode
The full traceback has been saved in /tmp/sphinx-err-RUH04X.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
('version', sys.version_info(major=2, minor=7, micro=17, releaselevel='final', serial=0))
('__file__', 'unicode')
make: *** [makefile:4: all] Error 2
ERROR: Job failed: exit code 1