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 Decorater, eric.snow, ncoghlan, serhiy.storchaka, vstinner
Date 2017-11-23.00:44:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Even the public implementation of PEP 432 is going to bound by the requirement to keep existing embedding logic working, and that's encapsulated in the new test Eric added in his PR:

    wchar_t *program = Py_DecodeLocale("spam", NULL);

So even if we were to revert the _PyRuntime.mem change in 3.7, we'd still face the same problem in 3.8, because we'd still be exposing the traditional configuration API - the new multi-step configuration API would be *optional* for folks that wanted to override the default settings more easily, rather than a backwards compatibility break with the previously supported way of doing things.

As a result, my preferred option is now to make exactly the promises we need to ensure that the above code works correctly, and then have Py_Initialize and Py_Finalize enforce those constraints:

* the public Py_Initialize API should fail if the memory allocators have already been set to something other than the default
* Py_Finalize should revert the memory allocators to their default setting
Date User Action Args
2017-11-23 00:44:22ncoghlansetrecipients: + ncoghlan, vstinner, eric.snow, serhiy.storchaka, Decorater
2017-11-23 00:44:22ncoghlansetmessageid: <>
2017-11-23 00:44:22ncoghlanlinkissue32096 messages
2017-11-23 00:44:22ncoghlancreate