[Python-Dev] Python initialization and embedded Python

Victor Stinner victor.stinner at gmail.com
Mon Nov 20 09:21:41 EST 2017

To not lost track of the issue, I created this issue on the bpo:


2017-11-20 7:54 GMT+01:00 Nick Coghlan <ncoghlan at gmail.com>:
> On 19 November 2017 at 18:52, Victor Stinner <victor.stinner at gmail.com> wrote:
>> Maybe we can find a compromise: revert the change on memory allocators. They
>> are too special to require to call PyRuntime_Init().
>> Currently, you cannot call PyMem_SetAllocators() before PyRuntime_Init().
> At least the raw allocators, anyway - that way, the developer facing
> documentation/comments can just say that the raw allocators can't have
> any prerequisites that aren't shared by regular
> malloc/calloc/realloc/free calls.
> If that's enough to get Py_DecodeLocale working again prior to
> _PyRuntime_Init(), then I'd suggest officially adding that to the
> "must work prior to Py_Initialize" list, otherwise we can re-examine
> it based on whatever's still broken after reverting the raw allocator
> changes.
> Cheers,
> Nick.
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list