[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2176c1867b34 by Terry Jan Reedy in branch 'default': Issue #18081: Back out temporary changeset, 2a9e1eb3719c, to merge new patch. http://hg.python.org/cpython/rev/2176c1867b34 -- ___ Python tracker

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: This was sent to #18242 but not here. I expected here also. New changeset c15d0baac3d6 by Terry Jan Reedy in branch '3.3': Issue *18081, #18242: Change Idle warnings capture in PyShell and run http://hg.python.org/cpython/rev/c15d0baac3d6 New changeset

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Improved 3.3 patch with tests incorporates Vinay's capture_warnings function to uncapture at end of import and main exit. I plan to apply after checking other versions and close this issue. -- Added file:

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I should have changed the Versions sooner, as soon as it became obvious that this was not just a 3.4 issue. The 'temporary' 3.4-only patch breaks forward merging of a better patch. I will back it out just before I commit a 3.3 patch to both eliminate the

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Here is a patch that looks much bigger than it really is. Idle was written before the warnings module, so the warnings system was conditioned on a successful warnings import. The test is no longer needed, and neither Vinay nor Victor repeated the test at the

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-25 Thread Brett Cannon
Brett Cannon added the comment: I replied on python-checkins, I'll state here as well: the fix is still off as warnings.formatwarning is still being replaced. On Jun 24, 2013 6:20 PM, STINNER Victor rep...@bugs.python.org wrote: STINNER Victor added the comment: This issue is *really*

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-25 Thread STINNER Victor
STINNER Victor added the comment: I replied on python-checkins, I'll state here as well: the fix is still off as warnings.formatwarning is still being replaced. My changeset only fixes the unit test (test_idle), it's just to fix buildbots. As I wrote, it's just a workaround. --

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2a9e1eb3719c by Victor Stinner in branch 'default': Issue #18081: Workaround ./python -m test_idle test_logging failure http://hg.python.org/cpython/rev/2a9e1eb3719c -- nosy: +python-dev ___ Python

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-24 Thread STINNER Victor
STINNER Victor added the comment: This issue is *really* annoying: it makes buildbots almost useless (it is no more possible to check if a commit introduces a regression). So until the best fix is decided, I applied a temporary fix (based on changes.diff written by Vinay Sajip): New

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-17 Thread Vinay Sajip
Vinay Sajip added the comment: With the attached patch, python -m test_idle test_logging passes (though test_idle still alters locale and environment). Running python -m idelib.idle, and using IDLE itself for inspection, the warnings.formatwarning is set to the implementation in idlelib.run.

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-17 Thread R. David Murray
R. David Murray added the comment: Note that it is a known issue that tk (not python's bindings, tk itself) alters the locale. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-17 Thread Brett Cannon
Brett Cannon added the comment: Another odd thing about this failure is that http://hg.python.org/cpython/rev/59a11c81dd3c should have fixed it as it should be setting warnings.showwarning() back to it's original value before the test began executing. So I checked PyShell again and found out

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-17 Thread Brett Cannon
Brett Cannon added the comment: And Lib/idlelib/run.py also does the substitution. I'll file a separate bug for all of this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-17 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +IDLE should not be replacing warnings.formatwarning ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: Seems to be fairly consistent on Windows but more random on Linux. I have also triggered it on my OS X machine randomly. Can't tell if it's a timing issue or some other test doing something bad. I'm worried solving it is going to require taking one of the

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: Found the test cases to cause this:: ./python.exe -m test test_idle test_logging Adding Roger and Terry to see if they happen to remember any of the IDLE tests using logging or warnings in a way that could cause this. P.S.: I thought we had a script somewhere

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: test_idle, which runs the tests in idlelib/idle_test, currently comprises 9 test methods and perhaps 100 lines that do not, as far as I know, use warnings or logging. However, perhaps this has an effect: F:\Python\dev\cpython\PCbuildpython_d -m test test_idle

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: I actually don't get the warnings when I run test_idle under regrtest. But what I did was followed a hunch and added a check for warnings.showwarning() and sure enough, it's been left modified by IDLE: PyShell replaces the function as a side-effect of import.

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I discovered the same thing a different way. Grepping Lib/*.py for 'Warning (from warnings module)' hits F:\Python\dev\cpython\Lib\idlelib\PyShell.py: 67: F:\Python\dev\cpython\Lib\idlelib\run.py: 34: Both monkey-patch warnings, when imported, to show warnings

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Vinay Sajip
Vinay Sajip added the comment: In the meanwhile, I will try using support.import_fresh_module('warnings') in test_logging, or better, saving and restoring warnings in test_idle. I agree the second option (changing test_idle) is better. The failing logging test is checking to ensure that the

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Vinay, please comment on this: on my Win7-64 system, as least, test_logging seems broken without running test_idle first. F:\Python\dev\cpython\PCbuildpython_d -m test test_logging [1/1] test_logging dummy.py:42: UserWarning: Explicit Warning --

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I reverted the change to test_logging, reran, and it runs fine, at least twice. Before the revert, I checked that the only two changes were the intentional ones. I tried adding idle_test/test_zdummy.py with a tearDownModule that deletes

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Vinay Sajip
Vinay Sajip added the comment: I would change the reverted test_logging to add print(logging._warnings_showwarning) before the failing assertions. If this is bound to the original warnings.showwarning implementation, all should be well. If it points to e.g. idle_showwarning, you would expect

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread R. David Murray
R. David Murray added the comment: As a side note, the various warnings about the execution environment being modified do not appear when tests are run under unittest because those warnings are generated by regrtest itself. -- ___ Python tracker

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The only locale setting is IOBinding.py: 21 # Try setting the locale, so that we can find out what encoding to use locale.setlocale(locale.LC_CTYPE, ) This section, up to line 65, might be wrapped either by a function or if statement. There are only 2

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-05-28 Thread R. David Murray
New submission from R. David Murray: The following failure is showing up frequently in the buildbots. I haven't checked closely enough to be sure if it is a heisenberg, but I suspect it is, since it doesn't seem to be related to any of the recent changesets that would have been included in