This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients eric.snow, htgoebel, ncoghlan, ned.deily, pmpp, springermac, vstinner
Date 2018-03-17.14:41:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521297661.95.0.467229070634.issue33042@psf.upfronthosting.co.za>
In-reply-to
Content
This shouldn't affect the public ABI, so I don't think it's a blocker for the ABI freeze, but it's a regression that effectively makes PySys_AddWarnOption (and related APIs) unusable, so we should definitely fix it before shipping 3.7.

For now, I've marked the bug as critical, and I'll be aiming to have it fixed before 3.7.0b3 at the end of the month.

For PySys_AddWarnOption and PySys_ResetWarnOptions, my current plan is to adjust them to maintain a singly-linked list of "wchar *" pointers when called prior to _Py_InitializeCore (i.e. when "PyThreadState_GET() == NULL"), while using the existing 3.7.0b2 path when the thread state is available. _Py_InitializeCore will then take care of cleaning up the memory allocations while converting them to Python unicode entries in a Python list object.

_PySys_AddXOption would work similarly (just with a separate list).

For PySys_AddWarnOptionUnicode, I think we need to make it call Py_FatalError for 3.7 when called prior to Py_Initialize, with a recommendation to use PySys_AddWarnOption instead. In 3.8, that API will become useful again, once the public Py_InitializeCore API provides a supported multi-stage startup process that allows unicode objects to be created safely before Py_InitializeMainInterpreter (or whatever we end up calling that API) reads sys.warnoptions and configures the warning subsystem accordingly.
History
Date User Action Args
2018-03-17 14:41:02ncoghlansetrecipients: + ncoghlan, htgoebel, vstinner, ned.deily, pmpp, eric.snow, springermac
2018-03-17 14:41:01ncoghlansetmessageid: <1521297661.95.0.467229070634.issue33042@psf.upfronthosting.co.za>
2018-03-17 14:41:01ncoghlanlinkissue33042 messages
2018-03-17 14:41:01ncoghlancreate