diff options
Diffstat (limited to 'sphinx/builders/text.py')
-rw-r--r-- | sphinx/builders/text.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/builders/text.py b/sphinx/builders/text.py index 81209d165..ef8c4a7ac 100644 --- a/sphinx/builders/text.py +++ b/sphinx/builders/text.py @@ -9,7 +9,6 @@ :license: BSD, see LICENSE for details. """ -import codecs from os import path from docutils.io import StringOutput @@ -82,7 +81,7 @@ class TextBuilder(Builder): outfilename = path.join(self.outdir, os_path(docname) + self.out_suffix) ensuredir(path.dirname(outfilename)) try: - with codecs.open(outfilename, 'w', 'utf-8') as f: # type: ignore + with open(outfilename, 'w', encoding='utf-8') as f: # type: ignore f.write(self.writer.output) except (IOError, OSError) as err: logger.warning(__("error writing file %s: %s"), outfilename, err) |