[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-28 Thread Brian Quinlan

Brian Quinlan br...@sweetapp.com added the comment:

Fixed in r87556.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-27 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

The reason for the bad interaction is that some of the tests in test_logging 
disable all existing loggers (due to the configuration tests - disabling of 
existing loggers is explicitly tested for), but as a side effect this also 
disabled the concurrent.futures logger.

I've made a change to test_logging which preserves the disabled state of all 
existing loggers across tests, and now all is well when testing

regrtest.py test_concurrent_futures test_logging test_concurrent_futures

after applying Brian's patch of 24 Dec 2010.

The change has been checked into py3k (r87513). However, this raises the wider 
issue of other loggers in stdlib and the effect on them of logging 
configuration calls. I'll raise this on python-dev for discussion.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-24 Thread Brian Quinlan

Brian Quinlan br...@sweetapp.com added the comment:

Sorry for being AWOL for so long. Attached is a patch that doesn't install a 
handler and checks stderr for the exception output. Unfortunately, it looks 
like the logging tests are still messing things up:

./python.exe -m test test_concurrent_futures test_concurrent_futures
[1/2] test_concurrent_futures
[2/2] test_concurrent_futures
All 2 tests OK.

% ./python.exe -m test test_concurrent_futures test_logging 
test_concurrent_futures
[1/3] test_concurrent_futures
[2/3] test_logging
[3/3] test_concurrent_futures
test test_concurrent_futures failed -- Traceback (most recent call last):
  File /home/bquinlan/shared/py3k/Lib/test/test_concurrent_futures.py, line 
642, in test_done_callback_raises
self.assertIn('Exception: doh!', stderr.getvalue())
AssertionError: 'Exception: doh!' not found in ''

2 tests OK.
1 test failed:
test_concurrent_futures

--
Added file: http://bugs.python.org/file20157/logging.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

I've added the logging code to implement and use a logger of last resort as 
discussed on the thread for http://bit.ly/last-resort-handler into the py3k 
branch, r87157. Gist of differences is available at 
https://gist.github.com/736120 - so Brian could remove the STDERR_HANDLER from 
his code. The futures test code can set sys.stderr to an io.StringIO instance 
during the test; the last resort handler checks for the sys.stderr value when 
emitting a record, not when the handler is created.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

s/logger of last resort/handler of last resort/

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-07 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

I will take a look at test_logging tidying up after itself, though the 
intention is to leave things as they were found (this is done in 
setUp/tearDown, and if it doesn't tidy up properly, that would be a bug).

As already explained in logging's documentation, there is no problem with just 
getting a logger and logging to it, BUT the top-level logger in any library 
package (and that includes stdlib, too) should have a NullHandler instance 
added to avoid the no handlers could be found for logger XXX message. This 
latter, one-off message is only there to guard against mis-configuration.

Re. Nick's comments about using logging in the stdlib - I'm not sure the reason 
he states is the reason for lack of traction, I think it's more to do with 
inertia. I will post separately on python-dev about use of logging in the 
stdlib itself, to see what specific obstacles stdlib maintainers see in the use 
of logging in their own modules.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-07 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Yeah, I think that comment was just a mistaken impression on my part.

Definitely something odd going on with the test interaction though.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-06 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
title: test_concurrent_futures implicitly installs a logging handler on import 
- Bad interaction between test_logging and test_concurrent_futures

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10626
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com