logilab-astng #70494 Pylint crashes if the word "coding" is used as keyword argument [validation pending]

[Bug 780014] [NEW] Pylint crashes if the word "coding" is used as keyword argument

Public bug reported:

Binary package hint: pylint

Example code:

--- pylint.py --------------------------
def do_something(a_word_with_coding=None):
pass
----------------------------------------

Now run pylint:

user@localhost:~$ pylint pylint.py
No config file found, using default configuration
Traceback (most recent call last):
File "/usr/bin/pylint", line 4, in <module>
lint.Run(sys.argv[1:])
File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 860, in __init__
linter.check(args)
File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 493, in check
self.check_astng_module(astng, walker, rawcheckers)
File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 563, in check_astng_module
checker.process_module(astng)
File "/usr/lib/pymodules/python2.7/pylint/checkers/format.py", line 191, in process_modul
+e
self.process_tokens(tokenize.generate_tokens(readline))
File "/usr/lib/pymodules/python2.7/pylint/checkers/format.py", line 218, in process_token
+s
for (tok_type, token, start, _, line) in tokens:
File "/usr/lib/python2.7/tokenize.py", line 288, in generate_tokens
line = readline()
File "/usr/lib/pymodules/python2.7/pylint/checkers/format.py", line 190, in <lambda>
readline = lambda: stream.readline().decode(node.file_encoding, 'replace')
LookupError: unknown encoding: None):

prioritynormal
typebug
done in0.22.0
load left0.000
closed by#8c2df89b15dc fix file encoding detection with python2.x (closes #70494)