This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author perilbrain
Recipients Bruce.Sherwood, THRlWiTi, bsherwood, perilbrain, roger.serwy, terry.reedy
Date 2016-11-03.03:11:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have signed the CA. Meantime a came across one more problem in function tabnanny(encoding issue) so I am attaching the new version of


    def tabnanny(self, source, encoding = None):
        # XXX: tabnanny should work on binary files as well
        f = io.StringIO(source.decode(encoding) if encoding else source)

def source_from_file(self, filename):
        with open(filename, 'rb') as f:
            source =
            encoding = tokenize.detect_encoding(f.readline)[0]
        return source, encoding

def _run_module_event(self, event):
        if not filename:
            self.no_save = True
            source = self.source_from_editor()
            filename =
            source, encoding = self.source_from_file(filename)
            self.no_save = False
        code = self.checksyntax(source, filename)
        if not code:
            return 'break'
        if not self.tabnanny(source, encoding):
            return 'break'
Date User Action Args
2016-11-03 03:11:42perilbrainsetrecipients: + perilbrain, terry.reedy, bsherwood, roger.serwy, THRlWiTi, Bruce.Sherwood
2016-11-03 03:11:40perilbrainsetmessageid: <>
2016-11-03 03:11:40perilbrainlinkissue19042 messages
2016-11-03 03:11:40perilbraincreate