On 05:47 pm, [email protected] wrote:
On Apr 9, 2014, at 9:42 AM, [email protected] 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
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python