Message295399
Recently, the Python initialization was reworked to start to implement the PEP 432:
- bpo-22257: commits 1abcf6700b4da6207fe859de40c6c1bada6b4fec and 6b4be195cd8868b76eb6fbe166acc39beee8ce36
Now, Py_NewInterpreter() leaks a reference on warnoptions in _PySys_EndInit(). We tried with Stéphane Wirtel and Louie Lu to add Py_DECREF(warnoptions), but test_capi does crash with this change.
The problem is that warnoptions is stored in a C global variable *and* in sys.warnoptions of each interpreter. The ownership of this variable is unclear.
I don't think that it's a good idea to share a list between two interpreters and so I created this issue to propose to redesign this variable.
The tricky part is that the C global variable is also accessed by 2 public C functions: PySys_ResetWarnOptions() and PySys_AddWarnOptionUnicode(). |
|
Date |
User |
Action |
Args |
2017-06-08 10:48:40 | vstinner | set | recipients:
+ vstinner, ncoghlan, eric.snow |
2017-06-08 10:48:40 | vstinner | set | messageid: <1496918920.92.0.347737718278.issue30598@psf.upfronthosting.co.za> |
2017-06-08 10:48:40 | vstinner | link | issue30598 messages |
2017-06-08 10:48:40 | vstinner | create | |
|