Merge pull request #16135 from 2m/wip-fix-docs-build-python3
=doc #16134 read file as binary stream, because StreamReader expects binary
This commit is contained in:
commit
9e915d73bb
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ class IncludeCode(Directive):
|
|||
encoding = self.options.get('encoding', env.config.source_encoding)
|
||||
codec_info = codecs.lookup(encoding)
|
||||
try:
|
||||
f = codecs.StreamReaderWriter(open(fn, 'U'),
|
||||
f = codecs.StreamReaderWriter(codecs.open(fn, 'Ub'),
|
||||
codec_info[2], codec_info[3], 'strict')
|
||||
lines = f.readlines()
|
||||
f.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue