diff options
Diffstat (limited to 'sphinx/builders/xml.py')
-rw-r--r-- | sphinx/builders/xml.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/builders/xml.py b/sphinx/builders/xml.py index 6198532c9..3e0d9224e 100644 --- a/sphinx/builders/xml.py +++ b/sphinx/builders/xml.py @@ -9,7 +9,6 @@ :license: BSD, see LICENSE for details. """ -import codecs from os import path from docutils import nodes @@ -95,7 +94,7 @@ class XMLBuilder(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) |