summaryrefslogtreecommitdiff
path: root/sphinx/ext/imgmath.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/imgmath.py')
-rw-r--r--sphinx/ext/imgmath.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/ext/imgmath.py b/sphinx/ext/imgmath.py
index 593835554..5be272ab1 100644
--- a/sphinx/ext/imgmath.py
+++ b/sphinx/ext/imgmath.py
@@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
-import codecs
import posixpath
import re
import shutil
@@ -123,7 +122,7 @@ def compile_math(latex, builder):
"""Compile LaTeX macros for math to DVI."""
tempdir = ensure_tempdir(builder)
filename = path.join(tempdir, 'math.tex')
- with codecs.open(filename, 'w', 'utf-8') as f: # type: ignore
+ with open(filename, 'w', encoding='utf-8') as f: # type: ignore
f.write(latex)
# build latex command; old versions of latex don't have the