STINNER Victor added the comment:

> New changeset 1bbedfb20932 by Victor Stinner in branch 'default':
> Issue #19421: fix a check in warnings.warn() to be able to use it during 
> Python
> http://hg.python.org/cpython/rev/1bbedfb20932

Without this fix, the following script crashs with an assertion error 
(Objects/typeobject.c:740: type_call: Assertion `!PyErr_Occurred()' failed.):
-------------
import warnings
warn = warnings.warn

class A:
    def __del__(self):
        warn("bla")

a=A()
-------------

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19421>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to