Le 06/05/2011 20:57, Vinay Sajip a écrit : > Éric Araujo <merwok <at> netwok.org> writes: >> Second: in packaging, we have two modules that create a logging >> handler. I’m not sure how if we should change the code or fix the >> tests >> to restore the _handlerList, or how. > > If you are saying this happens in your unit tests for packaging, then > you can > either restore the _handlerList using the approach in test_logging, > or else you > can just close the handlers when you've done with them. We create one handler in a command-line script, not in the lib, which is the Right Way AFAIU, but there is also one module that creates one handler (in order to set its level depending on a verbose attribute) deep in the library code, not in the command-line script, which I think is bad. Our tests that instantiate that object (dist.Distribution) end up modifying logging._handlerList, but I feel that the code is wrong, not the tests. The code is on https://bitbucket.org/tarek/cpython, in Lib/packaging. Thanks!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4