New submission from Nicholas Parslow <nick.pars...@soapboxlabs.com>:
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. ---------- components: Extension Modules messages: 325880 nosy: nparslow priority: normal severity: normal status: open title: warnings.warn fails silently with unicode input versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34752> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com