[Python-Dev] Python initialization and embedded Python (original) (raw)

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: https://bugs.python.org/issue32086

Victor

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 PyRuntimeInit().

Currently, you cannot call PyMemSetAllocators() before PyRuntimeInit(). 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 PyDecodeLocale working again prior to PyRuntimeInit(), then I'd suggest officially adding that to the "must work prior to PyInitialize" 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