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.
Created on 2012年04月16日 21:14 by brian.curtin, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| ImportError_changes.diff | brian.curtin, 2012年04月16日 21:14 | review | ||
| issue14600.diff | brian.curtin, 2012年04月17日 02:43 | |||
| Messages (9) | |||
|---|---|---|---|
| msg158499 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2012年04月16日 21:14 | |
Antoine mentioned in email that the reference handling should be changed, so here's a shot at it. I also condensed and renamed the convenience functions - I was paying too much attention to the surrounding conventions and made this harder than it had to be. |
|||
| msg158515 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年04月17日 00:30 | |
Looks good on the principle. Implementation is a bit weird: you don't need to check name and path for NULL-ness? |
|||
| msg158516 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年04月17日 00:30 | |
Oh, and is PyErr_SetExcWithArgsKwargs still useful? |
|||
| msg158523 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2012年04月17日 02:43 | |
How about this patch? Adds NULL checking and merges PyErr_SetExcWithArgsKwargs inside PyErr_SetImportError since it's not needed by itself. Docs are also updated in line with these changes. |
|||
| msg158536 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年04月17日 10:21 | |
You probably want to check args and kwargs for NULL-ness too. Otherwise, looks good. |
|||
| msg158570 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年04月17日 21:57 | |
New changeset 7a32b9380ffd by Brian Curtin in branch 'default': Fix #14600. Correct reference handling and naming of ImportError convenience function http://hg.python.org/cpython/rev/7a32b9380ffd |
|||
| msg158669 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年04月18日 22:05 | |
As was pointed on python-dev for the first commit: args = PyTuple_New(1); if (args == NULL) return NULL; kwargs = PyDict_New(); if (args == NULL) return NULL; It looks like the second block has a copy-paste typo and should check kwargs, not args. |
|||
| msg165356 - (view) | Author: Eli Bendersky (eli.bendersky) * (Python committer) | Date: 2012年07月13日 05:29 | |
Eric: your note appears to be fixed in the code. Can this issue be closed? |
|||
| msg165391 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年07月13日 16:15 | |
Yep, bf23a6c215f6 fixed it, thanks for the ping. Brian or Antoine, can you close this or was there something else? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:29 | admin | set | github: 58805 |
| 2012年07月13日 16:58:36 | brian.curtin | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2012年07月13日 16:15:58 | eric.araujo | set | messages: + msg165391 |
| 2012年07月13日 05:29:09 | eli.bendersky | set | nosy:
+ eli.bendersky messages: + msg165356 |
| 2012年04月18日 22:05:28 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg158669 |
| 2012年04月17日 21:57:31 | python-dev | set | nosy:
+ python-dev messages: + msg158570 |
| 2012年04月17日 10:28:54 | pitrou | link | issue14593 superseder |
| 2012年04月17日 10:21:54 | pitrou | set | messages: + msg158536 |
| 2012年04月17日 02:43:07 | brian.curtin | set | files:
+ issue14600.diff messages: + msg158523 |
| 2012年04月17日 00:30:48 | pitrou | set | messages: + msg158516 |
| 2012年04月17日 00:30:18 | pitrou | set | messages: + msg158515 |
| 2012年04月16日 21:14:28 | brian.curtin | create | |