]> granicus.if.org Git - python/commit
PyTokenizer_FindEncoding() always failed because it set the tokenizer state
authorBrett Cannon <bcannon@gmail.com>
Thu, 4 Sep 2008 05:04:25 +0000 (05:04 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 4 Sep 2008 05:04:25 +0000 (05:04 +0000)
commit8a9583ec5c00384514fe9f5045866ad6ebd2be5a
treee360bd182c5c79d8dd3ca9147fce290b9efdda03
parent451e99b393529b45db3b68daaf09925ea863bf1a
PyTokenizer_FindEncoding() always failed because it set the tokenizer state
with only a file pointer when it called fp_setreadl() which expected a file
path. Changed fp_setreadl() to use either a file path or file descriptor
(derived from the file pointer) to fix the issue.

Closes issue 3594.
Reviewed by Antoine Pitrou and Benjamin Peterson.
Lib/test/test_imp.py
Misc/NEWS
Parser/tokenizer.c