summaryrefslogtreecommitdiff
path: root/sphinx/builders/html.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/builders/html.py')
-rw-r--r--sphinx/builders/html.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index a5d8fd306..b8b03c072 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -25,7 +25,6 @@ from docutils.frontend import OptionParser
from docutils.io import DocTreeInput, StringOutput
from docutils.readers.doctree import Reader as DoctreeReader
from docutils.utils import relative_path
-from six import text_type
from sphinx import package_dir, __display_version__
from sphinx.application import ENV_PICKLE_FILENAME
@@ -86,10 +85,10 @@ def get_stable_hash(obj):
return get_stable_hash(list(obj.items()))
elif isinstance(obj, (list, tuple)):
obj = sorted(get_stable_hash(o) for o in obj)
- return md5(text_type(obj).encode()).hexdigest()
+ return md5(str(obj).encode()).hexdigest()
-class Stylesheet(text_type):
+class Stylesheet(str):
"""A metadata of stylesheet.
To keep compatibility with old themes, an instance of stylesheet behaves as
@@ -101,7 +100,7 @@ class Stylesheet(text_type):
def __new__(cls, filename, *args, **attributes):
# type: (str, str, str) -> None
- self = text_type.__new__(cls, filename) # type: ignore
+ self = str.__new__(cls, filename) # type: ignore
self.filename = filename
self.attributes = attributes
self.attributes.setdefault('rel', 'stylesheet')
@@ -146,7 +145,7 @@ class JSContainer(list):
return ret
-class JavaScript(text_type):
+class JavaScript(str):
"""A metadata of javascript file.
To keep compatibility with old themes, an instance of javascript behaves as
@@ -158,7 +157,7 @@ class JavaScript(text_type):
def __new__(cls, filename, **attributes):
# type: (str, **str) -> None
- self = text_type.__new__(cls, filename) # type: ignore
+ self = str.__new__(cls, filename) # type: ignore
self.filename = filename
self.attributes = attributes
self.attributes.setdefault('type', 'text/javascript')