msg73541 - (view) |
Author: Scott David Daniels (scott_daniels) * |
Date: 2008-09-21 23:52 |
Idle doesn't accept the new improved warnings arguments, thus escalating warnings to failures. This is, I believe, the core reason that Idle was failing on windows (warnings about deprecated set_daemon call escalated to a failure). Files affected: idlelib/PyShell.py and idlelib/run.py On chasing this, it looks like the code in warnings.py is masking IOErrors a little too broadly, so we should probably also narrow the exception handling in warnings.py Patch coming, but not ready just yet. |
|
|
msg73581 - (view) |
Author: Guilherme Polo (gpolo) *  |
Date: 2008-09-22 14:51 |
The first part was already mentioned in , but not closing this in favor of the second part of your message. |
|
|
msg73631 - (view) |
Author: Scott David Daniels (scott_daniels) * |
Date: 2008-09-23 12:45 |
I found that patch, but it confuses showwarning and formatwarning parameter changes. |
|
|
msg73946 - (view) |
Author: Scott David Daniels (scott_daniels) * |
Date: 2008-09-27 23:32 |
OK, Issues: 1) warnings.py I/O errors in formatwarning will be masked and misinterpreted as failures to write on stderr, and no output will be attempted. 2) warnings.py A line with of whitespace will be shown, rather than suppressed. 3) idlelib/PyShell.py idle_show_warning did not take new args to showwarning. & a repeat of an error much like 1. 3) idlelib/PyShell.py idle_format_warning did not take new arg to formatwarning. 4) idlelib/PyShell.py extended_linecache_checkcache did not pass its arg along to orig_checkcache. Had to rename the element in the loop to avoid trashing the arg. 5) idlelib/run.py idle_formatwarning_subproc must also follow the new protocol for formatwarning. |
|
|
msg73947 - (view) |
Author: Scott David Daniels (scott_daniels) * |
Date: 2008-09-27 23:33 |
Here is a test for the fixes provided. |
|
|
msg76191 - (view) |
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *  |
Date: 2008-11-21 16:47 |
This is already corrected by r66922 (), but the patches are different and there are some things I don't like in the present implementation: - in idle_showwarning, the "file" argument is ignored and always replaced by warning_stream. - warnings.formatwarning is passed a "file" argument: this could fail, but works only because the function is monkey-patched. But "file" is not even used there! The attached patch seems better, but does not apply cleanly any more. |
|
|
msg76280 - (view) |
Author: Scott David Daniels (scott_daniels) * |
Date: 2008-11-23 23:32 |
Attached parts.zip -- a zip of updates for Python 2.6 and Python 3.0 against the current source [zip has two For Python 2.6: py26/diff_py26.txt -- differ against python26-maint tree py26/PyShell.py -- Replacement file for .../Lib/idlelib/PyShell.py py26/run.py -- Replacement file for .../Lib/idlelib/run.py For Python 3.0: py30/py3k_diff.txt -- differ against python3k tree py30/PyShell.py -- Replacement file for .../Lib/idlelib/PyShell.py py30/run.py -- Replacement file for .../Lib/idlelib/run.py |
|
|
msg91223 - (view) |
Author: Guilherme Polo (gpolo) *  |
Date: 2009-08-03 15:44 |
This looks good Scott, I'm just attaching the .diff here with real minor changes and will be applying if no one is against it. |
|
|
msg91550 - (view) |
Author: Guilherme Polo (gpolo) *  |
Date: 2009-08-14 14:03 |
Committed on r74447, will merge into py3k. |
|
|
msg91554 - (view) |
Author: Guilherme Polo (gpolo) *  |
Date: 2009-08-14 15:08 |
> Committed on r74447, will merge into py3k. py3k: r74450 |
|
|