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 nparslow
Recipients nparslow
Date 2018-09-20.14:15:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537452937.66.0.956365154283.issue34752@psf.upfronthosting.co.za>
In-reply-to
Content
example:

Python 2.7.14 |Anaconda, Inc.| (default, Dec  7 2017, 17:05:42) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.warn(u'blé')
>>> warnings.warn('blah')
__main__:1: UserWarning: blah

the warnings.warn_explicit function seems to be the part that is failing. On a machine which doesn't use anaconda it fails in an identical manner.

if you do:
>>> with warnings.catch_warnings(record=True) as w:
...   warnings.warn(u'blé')
... 
>>> w
[<warnings.WarningMessage object at 0x7ffadb35b190>]
>>> w[0].message
UserWarning(u'bl\xe9',)


I can get that it fails with unicode (though it's annoying) but the silent fail is really bad imo.
History
Date User Action Args
2018-09-20 14:15:37nparslowsetrecipients: + nparslow
2018-09-20 14:15:37nparslowsetmessageid: <1537452937.66.0.956365154283.issue34752@psf.upfronthosting.co.za>
2018-09-20 14:15:37nparslowlinkissue34752 messages
2018-09-20 14:15:37nparslowcreate