[issue35452] Make PySys_HasWarnOptions() never raising an exception

2018-12-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +10308 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue35452] Make PySys_HasWarnOptions() never raising an exception

2018-12-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : While "warnings" was a static variable in Python/sysmodule.c, it was guarantied that PySys_HasWarnOptions() never raises an exception. But since it became a value of the sys dict (see issue30860), it can have an arbitrary type, and PySys_HasWarnOptions()