[Twisted-Python] Twisted 14.0.0-pre2 Announcement

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Apr 9 13:34:08 MDT 2014


On 05:47 pm, glyph at twistedmatrix.com wrote:
>
>On Apr 9, 2014, at 9:42 AM, exarkun at twistedmatrix.com wrote:
>>This is a warning that just about every Twisted user is going to see 
>>and it's confusing (_sslverify.py? what?) and poorly formatted.
>
>I can definitely fix the formatting (and maybe a few other things in 
>this area...) for a new prerelease.
>
>But how would you recommend we make the warning come from a more 
>sensible location that doesn't mention _sslverify.py?  I'd really like 
>this to look specific, comprehensible, and actionable to users.  Should 
>it not be using the warnings module?

I added one suggestion to the ticket <https://tm.tl/7097>: 
`warnings.showwarning(..., "", "")` will produce a message like ":: 
UserWarning: ..." (at least one the one version of Python I tested on, 
who knows if it's the same across all the versions we care about) which 
is still weird but less so.

Off the top of my head I don't have any better suggestions than that.  I 
guess there is the other obvious approach of just writing some bytes to 
stderr...

Considering my various experiences with the warnings module I'm even a 
little tempted to go that way.  It does seem like the choice is between 
really bad and only sort of bad, though.

(Oops, didn't click send fast enough, now I'm imagining other things 
like passing some other string to `showwarning` as the file name - like 
"Twisted TLS Support" or whatever else you want to make the resulting 
message look pretty.)

Jean-Paul



More information about the Twisted-Python mailing list