Message301822
The following code causes warn_explicit() (in Python/_warnings.c) to raise a
SystemError:
import warnings
warnings.filterwarnings('once')
warnings.onceregistry = None
warnings.warn_explicit(message='foo', category=Warning, filename='bar',
lineno=1, registry=None)
this is because warn_explicit() assumes that warnings.onceregistry is a dict,
and passes it to update_registry(), which passes it to already_warned(), which
eventually passes it to _PyDict_SetItemId(), which raises the SystemError. |
|
Date |
User |
Action |
Args |
2017-09-10 17:37:43 | Oren Milman | set | recipients:
+ Oren Milman |
2017-09-10 17:37:43 | Oren Milman | set | messageid: <1505065063.57.0.46720585304.issue31411@psf.upfronthosting.co.za> |
2017-09-10 17:37:43 | Oren Milman | link | issue31411 messages |
2017-09-10 17:37:43 | Oren Milman | create | |
|