Source

sphinx / sphinx / util / __init__.py

Diff from to

sphinx/util/__init__.py

 
 import sphinx
 from sphinx.errors import PycodeError
+from sphinx.util.pycompat import bytes
 
 # import other utilities; partly for backwards compatibility, so don't
 # prune unused ones indiscriminately
 
 def force_decode(string, encoding):
     """Forcibly get a unicode string out of a bytestring."""
-    if isinstance(string, str):
+    if isinstance(string, bytes):
         if encoding:
             string = string.decode(encoding)
         else: