[issue24967] add errors='ignore' to print kwargs
New submission from Lukáš Němec: Please add errors='...' to print's kwargs and pass it to codecs that are called from print. Sometimes you have undecodable/unencodable characters that you want to remove from the printed text. Now you need to call 'mytext'.encode('enc', errors='replace').decode('enc') to achieve the same result. This would be just a shortcut. Thank you :) -- messages: 249389 nosy: Lukáš.Němec priority: normal severity: normal status: open title: add errors='ignore' to print kwargs versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue24967> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23637] Warnings error with non-ascii chars.
New submission from Lukáš Němec: File "/usr/lib/python2.7/warnings.py", line 29, in _show_warning file.write(formatwarning(message, category, filename, lineno, line)) File "/usr/lib/python2.7/warnings.py", line 38, in formatwarning s = "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message) UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 42: ordinal not in range(128) Only thing required to make this work is add "u" in front of the message so it is unicode. This will work for all ascii characters and all non-ascii should pass unicode anyway. -- components: Library (Lib) messages: 237850 nosy: Lukáš.Němec priority: normal severity: normal status: open title: Warnings error with non-ascii chars. type: crash versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue23637> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23272] Python built-in comparison problem
Changes by Lukáš Němec : -- resolution: -> not a bug status: open -> closed ___ Python tracker <http://bugs.python.org/issue23272> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23272] Python built-in comparison problem
Changes by Lukáš Němec : -- nosy: Lukáš.Němec priority: normal severity: normal status: open title: Python built-in comparison problem ___ Python tracker <http://bugs.python.org/issue23272> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18598] Importlib, more verbosity please
Lukáš Němec added the comment: Also, please do not forget on backports for python 2.6+ :) -- ___ Python tracker <http://bugs.python.org/issue18598> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18598] Importlib, more verbosity please
Lukáš Němec added the comment: Yes, absolutely, that is what was I needed to debug it easily, the name parameter Thank you :) -- ___ Python tracker <http://bugs.python.org/issue18598> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18598] Importlib, more verbosity please
New submission from Lukáš Němec: Hello, recently I filed this bugreport to Django, but they clarified this by pointing me to commits for new version of Django that uses python builtin importlib (import_module) But since most of their import_module code is done like [import_module(x) for y if blahblah], it is very difficult for me to debug code where Django tries to import some package, and all I get back is message "relative imports require the 'package' argument" This message tells me exactly nothing :), just that something somewhere, even 3rd party app tried to do relative imports ... what did it import, with what parameters? I edited this locally for debugging, and changed it to this: "relative imports require the 'package' argument, package: %s" % name This simple change of the message allowed me to find the problem in a few seconds.. Would you please consider adding something similar to importlib for better debugging? Thank you :) -- components: Library (Lib) messages: 193922 nosy: Lukáš.Němec priority: normal severity: normal status: open title: Importlib, more verbosity please type: enhancement ___ Python tracker <http://bugs.python.org/issue18598> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com