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 eric.snow
Recipients eric.snow, ncoghlan, serhiy.storchaka, vstinner
Date 2017-11-20.21:28:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
(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.

Date User Action Args
2017-11-20 21:28:36eric.snowsetrecipients: + eric.snow, ncoghlan, vstinner, serhiy.storchaka
2017-11-20 21:28:36eric.snowsetmessageid: <>
2017-11-20 21:28:36eric.snowlinkissue32096 messages
2017-11-20 21:28:36eric.snowcreate