mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Merged revisions 81393 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81393 | victor.stinner | 2010-05-21 12:52:08 +0200 (ven., 21 mai 2010) | 3 lines Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the correct encoding ........
This commit is contained in:
parent
b78f7f7db0
commit
8e2e16e95e
2 changed files with 7 additions and 1 deletions
|
@ -93,8 +93,11 @@ def check(file):
|
||||||
check(fullname)
|
check(fullname)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
with open(file, 'rb') as f:
|
||||||
|
encoding, lines = tokenize.detect_encoding(f.readline)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = open(file)
|
f = open(file, encoding=encoding)
|
||||||
except IOError as msg:
|
except IOError as msg:
|
||||||
errprint("%r: I/O Error: %s" % (file, msg))
|
errprint("%r: I/O Error: %s" % (file, msg))
|
||||||
return
|
return
|
||||||
|
|
|
@ -46,6 +46,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the
|
||||||
|
correct encoding
|
||||||
|
|
||||||
- Issue #7507: Quote "!" in pipes.quote(); it is special to some shells.
|
- Issue #7507: Quote "!" in pipes.quote(); it is special to some shells.
|
||||||
|
|
||||||
- Issue #8663: distutils.log emulates backslashreplace error handler. Fix
|
- Issue #8663: distutils.log emulates backslashreplace error handler. Fix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue