Message130218
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. |
|
Date |
User |
Action |
Args |
2011-03-07 02:01:05 | Trundle | set | recipients:
+ Trundle, loewis, brett.cannon, belopolsky, vstinner, techtonik, giampaolo.rodola, nedbat, r.david.murray, gruszczy, cool-RR |
2011-03-07 02:01:05 | Trundle | set | messageid: <1299463265.2.0.296686537593.issue1559549@psf.upfronthosting.co.za> |
2011-03-07 02:01:04 | Trundle | link | issue1559549 messages |
2011-03-07 02:01:04 | Trundle | create | |
|