Message 130218 - Python tracker

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.

Content
There are some issues with the patch:

- The check for size of `args` in `ImportError_init()` is wrong: You can't create an `ImportError` with 3 arguments now ("TypeError: ImportError expected 2 arguments, got 3")
- `ImportError_clear()` doesn't clear ``self->msg``.
- `ImportError_str()` doesn't increase the reference count for ``self->msg`` before returning it.
- The code that raises the exception (Python/import.c) doesn't check for error return values: All the calls can return NULL which will cause a segfault due to the uncoditional Py_DECREFs.
- Using `PyUnicode_DecodeASCII()` for the module name is wrong (IMHO), it should rather be something like `PyUnicode_DecodeUTF8()` as module names can contain non-ASCII characters in Python 3 and are AFAIK (at least right now) always encoded using utf-8.