Message197196
Nasty bug. Running a file with 'coding=0', a quite legitimate assignment statement, causes Idle to close, with LookupError, leading to SyntaxError, reported on the console if there is one ('crash' otherwise). (Idle closing is a separate problem, with an issue, from the misinterpretation of 'coding'.)
Loading such a file works with a warning that should not be there.
Adding # leads to "SyntaxError: unknown encoding" in a message box, without closing Idle. I presume this is to be expected and is proper. There is also a warning on loading.
The code patch adds '^[ \t\f]' to the re. \f = FormFeed? Should that really be there? The PEP patch instead adds '^[ \t\v]', \v= VerticalTab? Same question, and why the difference?
Your other changes to IOBinding.coding_spec look correct and fix a couple of bugs in the function (searching all lines for the coding cookie, mangling a line without a line end).
Someone else should review the other code changes. |
|
Date |
User |
Action |
Args |
2013-09-07 23:09:45 | terry.reedy | set | recipients:
+ terry.reedy, loewis, georg.brandl, kbk, benjamin.peterson, roger.serwy, meador.inge, serhiy.storchaka, Paul.Bonser, armicron |
2013-09-07 23:09:45 | terry.reedy | set | messageid: <1378595385.78.0.735567012714.issue18873@psf.upfronthosting.co.za> |
2013-09-07 23:09:45 | terry.reedy | link | issue18873 messages |
2013-09-07 23:09:45 | terry.reedy | create | |
|