[issue10588] imp.find_module raises unexpected SyntaxError
Brett Cannon added the comment: imp.find_module() is now documented as deprecated, so changing the mode that files are opened in would change backwards-compatibility but wouldn't be worth it. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Benjamin Peterson benja...@python.org added the comment: The reason for this is that file_module tries to detect the encoding of the file to set the encoding for the opened file. IMO, it should just return a file in binary mode. -- nosy: +benjamin.peterson, haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Changes by Éric Araujo mer...@netwok.org: -- nosy: +brett.cannon, eric.araujo, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
New submission from Emile Anclin emile.anc...@logilab.fr: Considering following file: $ cat pylint/test/input/func_unknown_encoding.py # -*- coding: IBO-8859-1 -*- check correct unknown encoding declaration __revision__ = '' $ When we try to find that module, imp.find_module raises SyntaxError: from imp import find_module find_module('func_unknown_encoding', None) Traceback (most recent call last): File stdin, line 1, in module SyntaxError: encoding problem: with BOM It should be considered as a bug, as stated by Brett Cannon: Considering these semantics changed between Python 2 and 3 w/o a discernable benefit (I would consider it a negative as finding a module should not be impacted by syntactic correctness; the full act of importing should be the only thing that cares about that), I would consider it a bug that should be filed. -- messages: 122896 nosy: emile.anclin priority: normal severity: normal status: open title: imp.find_module raises unexpected SyntaxError type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Changes by Ron Adam ron_a...@users.sourceforge.net: -- nosy: +ron_adam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com