Serhiy Storchaka added the comment:

Proposed patch fixes minor bugs in Python/getargs.c:

1. Replaces TypeError with confusing error message for buffer overflow for 
"es#" and "et#" format units to ValueError with correct error message. Due to 
the risk to break working code, may be we will left TypeError in maintained 
releases, but error message should be fixed in any case.

2. Replaces all other TypeError with confusing error message to SystemError 
with correct error message. All this errors are programming errors (incorrect 
use of PyArg_Parse* functions) and aren't occurred in valid extensions.

3. Fixes error messages for "k" and "K" format units.

4. Fixes error messages for "es" and "et" format units.

5. Fixes error messages for "compat" mode (looks as this mode is not used and 
can be freely removed in Python 3).

----------
assignee: docs@python -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file41720/pyarg_parse_encoded_string.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26198>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to