This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients nparslow, xtreak
Date 2018-09-24.12:38:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537792680.6.0.956365154283.issue34752@psf.upfronthosting.co.za>
In-reply-to
Content
Since Nick had some issue on adding a message to the issue I am adding the email sent to me as a message below : 


(sorry I can't see how to post a reply message on the bugs page, I'm still new to this)

anyhow here's what I wanted to post:

Thanks for finding the bug!
Maybe a preferable behaviour would be to split the error types
 - an IOError could still pass (I'm really not sure what the ideal treatment in that case is
 - a Unicode error would still print a warning but it would be something like a generic 'warning: non-standard text found in warning text so only printing this' (I'm sure there's something better sounding / more consistent with other warnings but I don't know them that well)

so the code would look something like:
except (UnicodeError):
    message = "non-standard text found in warning text so only printing this"
    file.write(formatwarning(message, category, filename, lineno, line))
except (IOError):
        pass # the file (probably stderr) is invalid - this warning
 gets lost.



but I'm not sure if an IOError inside the UnicodeError handling would still be caught (?)

anyhow I'm not sure how standard/appropriate a generic warning would be within the broader context of python (?) I think for us we'll probably just bite the bullet and switch to python3 to avoid this kind of thing since we'll potentially have a lot of unicode messages in the near future.

thanks again,
Nick Parslow
History
Date User Action Args
2018-09-24 12:38:00xtreaksetrecipients: + xtreak, nparslow
2018-09-24 12:38:00xtreaksetmessageid: <1537792680.6.0.956365154283.issue34752@psf.upfronthosting.co.za>
2018-09-24 12:38:00xtreaklinkissue34752 messages
2018-09-24 12:38:00xtreakcreate