Message306585
(see the python-dev thread [1])
(related: issue #32086)
When I consolidated the global runtime state into a single global, _PyRuntime, calls Py_DecodeLocale() started to break if the runtime hadn't been intialized yet. This is because that function relies on PyMem_RawMalloc() and PyMem_RawFree(), which rely on the raw allocator having been initialized as part of the runtime (it used to be intialized statically).
The documentation for various "Process-wide parameters" [2] explicitly directs users to call Py_DecodeLocale() where necessary. The docs for Py_DecodeLocale(), in turn, explicitly refer to calling PyMem_RawFree(). So changing the pre-runtime-init behavior of Py_DecodeLocale() and PyMem_RawFree() is a regression that should be fixed.
[1] https://mail.python.org/pipermail/python-dev/2017-November/150605.html
[2] https://docs.python.org/3/c-api/init.html#process-wide-parameters |
|
Date |
User |
Action |
Args |
2017-11-20 21:28:36 | eric.snow | set | recipients:
+ eric.snow, ncoghlan, vstinner, serhiy.storchaka |
2017-11-20 21:28:36 | eric.snow | set | messageid: <1511213316.33.0.213398074469.issue32096@psf.upfronthosting.co.za> |
2017-11-20 21:28:36 | eric.snow | link | issue32096 messages |
2017-11-20 21:28:36 | eric.snow | create | |
|