[Twisted-Python] supressess warnings
Itamar Shtull-Trauring
twisted at itamarst.org
Tue Apr 1 11:48:04 MST 2003
On Tue, 1 Apr 2003 07:00:53 -0500
Andrew Dalke <dalke at dalkescientific.com> wrote:
> A bit of searching later and I found
> twisted/python/log.py
> which redefines (!) warnings.showwarning to dump the data to a
> logfile, which is initialized to a NullFile(), which does nothing.
>
> So the twisted code is throwing some (potentially useful) diagnostics.
Fixed in CVS - warnings will be logged to stderr if no log file was
specified.
> I started to change the code, so I could submit a patch. I got the
> code out of CVS and am reading the documentation at
> http://twistedmatrix.com/documents/howto/coding-standard
> It says that the main test suite builder is in 'twisted.test.test_all'
Fixed doc in CVS.
> That module doesn't exist (can't import it) nor is the appropriate
> file present anywhere. And the hyperlink from that page yields
> "No Such Resource
> File not found."
>
> It then says
> Acceptance tests are all automated by the bin/accepttests
> but that program is in admin/accepttests
Fixed in CVS.
> I ran that for my Mac OS X machine, with 'open' as the
> WEBBROWSER setting (where does the '-b' option go, since
> open doesn't block .. do I pass it to 'accepttests'? Yes.) and
> /bin/true
> as my IRCCLIENT, since I wouldn't know what to do with one
> even assuming I had one.
Running admintests correctly is hard - I've never gotten the web distrib
tests to pass. In general these tests are more for the release manager
than for end users.
> So I tried to rewrite the code given that it looks like the self-tests
> run reasonably well, but then ran into complications with this bit of
>
> code
> It looks like Log.synchronized is old code that can be removed. Yes?
Probably not.
Basically, Twisted logging starts out with all log.msg() messages being
discarded, and exceptions, errors and in CVS warnings, logged to stderr.
startLogging() will set it so all messages get logged to the specified
file-like object.
--
Itamar Shtull-Trauring http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting
More information about the Twisted-Python
mailing list