mirror of https://github.com/python/cpython
Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the correct
encoding
This commit is contained in:
parent
b52187710e
commit
f0feec2cb6
|
@ -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,6 +375,9 @@ C-API
|
|||
Library
|
||||
-------
|
||||
|
||||
- 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`.
|
||||
|
|
Loading…
Reference in New Issue