STINNER Victor added the comment: imghdr_bytes.patch should use os.fsencode() to encode the filename, not filename.encode().
(You may use a valid sound file of the Python suite test instead of generating an invalid sounf file.) imghdr_files.patch looks overkill. I don't think that it's useful to support integer file descriptor. Being able to pass an open file is enough. imghdr_bytes.patch is fine. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19997> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com