[issue33714] module can set an exception in tp_clear

2019-10-08 Thread Petr Viktorin
Petr Viktorin added the comment: Indeed, it can be closed. Thanks Serhiy for the better error message! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33714] module can set an exception in tp_clear

2019-10-08 Thread miss-islington
miss-islington added the comment: New changeset d7c387384a27f37e4e3fa7890c859212c56b45b2 by Miss Islington (bot) (Serhiy Storchaka) in branch 'master': bpo-33714: Output an exception raised in module's m_clear(). (GH-16592)

[issue33714] module can set an exception in tp_clear

2019-10-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16181 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16592 ___ Python tracker

[issue33714] module can set an exception in tp_clear

2019-10-04 Thread Ashley Whetter
Ashley Whetter added the comment: I've just realised that this issue was specific to tp_clear on a module and not on objects. tp_clear on modules has already been fixed in https://bugs.python.org/issue33622. I think this is closable. -- ___

[issue33714] module can set an exception in tp_clear

2019-10-04 Thread Ashley Whetter
Ashley Whetter added the comment: I've attached a reproduction case. Here's the setup.py that I used: ``` from distutils.core import Extension, setup extension = Extension("breaky", ["breaky.c"]) setup( name="tp_clear", version="0.1.0", ext_modules=[extension], ) ``` which I

[issue33714] module can set an exception in tp_clear

2018-09-11 Thread Petr Viktorin
Petr Viktorin added the comment: I'm not sure what tp_clear should do in this situation. Other than propagating the exception to the GC, the most reasonable behavior seems to be to write the exception to stderr and ignore it -- but I think having the GC do that would be more robust. IOW, I

[issue33714] module can set an exception in tp_clear

2018-05-31 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +petr.viktorin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33714] module can set an exception in tp_clear

2018-05-31 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33714] module can set an exception in tp_clear

2018-05-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The tp_clear handler of the module object calls a custom clear function if the PyModuleDef.m_clear field is set. This function can set an exception which will be leaked to the garbage collector. An exception in tp_clear is not expected and caused a