Kaydet (Commit) f0feec2c authored tarafından Victor Stinner's avatar Victor Stinner

Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the correct

encoding
üst b5218771
......@@ -93,8 +93,11 @@ def check(file):
check(fullname)
return
with open(file, 'rb') as f:
encoding, lines = tokenize.detect_encoding(f.readline)
try:
f = open(file)
f = open(file, encoding=encoding)
except IOError as msg:
errprint("%r: I/O Error: %s" % (file, msg))
return
......
......@@ -375,7 +375,10 @@ C-API
Library
-------
- Issue #4870: Add an `options` attribute to SSL contexts, as well as
- Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the
correct encoding
- Issue #4870: Add an `options` attribute to SSL contexts, as well as
several ``OP_*`` constants to the `ssl` module. This allows to selectively
disable protocol versions, when used in combination with `PROTOCOL_SSLv23`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment