[issue12946] PyModule_GetDict() claims it can never fail, but it can

2016-08-19 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, Stefan! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2016-08-19 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b64a049f451 by Berker Peksag in branch 'default': Issue #12946: Remove dead code in PyModule_GetDict https://hg.python.org/cpython/rev/4b64a049f451 -- ___ Python tracker

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd2a4c138b76 by Berker Peksag in branch '3.5': Issue #12946: Document that PyModule_GetDict can fail in some cases https://hg.python.org/cpython/rev/bd2a4c138b76 New changeset c2e74b88947d by Berker Peksag in branch 'default': Issue #12946: Merge fr

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2016-08-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: you can merge the patch. -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2016-08-06 Thread Berker Peksag
Berker Peksag added the comment: I've changed the dead code to assert(d != NULL); and added the following sentence to PyModule_GetDict documentation: If *module* is not a module object (or a subtype of a module object), :exc:`SystemError` is raised and *NULL* is returned.

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2014-09-25 Thread STINNER Victor
STINNER Victor added the comment: > I gave two reasons why this function can fail, and one turns out to be > assumed-to-be-dead code. If the call to PyDict_New() is never called, the test can be replaced with an assertion. -- ___ Python tracker <

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2014-09-25 Thread theme
Changes by theme : -- versions: +Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-13 Thread Stefan Behnel
Stefan Behnel added the comment: I gave two reasons why this function can fail, and one turns out to be assumed-to-be-dead code. So, no, there are two issues now, one with the documentation, one with the code. -- ___ Python tracker

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-13 Thread STINNER Victor
STINNER Victor added the comment: So, can we close this issue? -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The path with PyDict_New() is never taken, because PyModule_New already fills md_dict. -- nosy: +amaury.forgeotdarc ___ Python tracker _

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-09 Thread Stefan Behnel
New submission from Stefan Behnel : As is obvious from the code, PyModule_GetDict() can fail if being passed a non-module object, and when the (unlikely) dict creation at the end fails. The documentation of the C-API function should be fixed to reflect that, i.e. it should state that NULL is r