Issue 32086: C API: Clarify which C functions are safe to be called before Py_Initialize() (original) (raw)
Issue32086
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.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/76267
classification
Title: | C API: Clarify which C functions are safe to be called before Py_Initialize() | ||
---|---|---|---|
Type: | Stage: | resolved | |
Components: | Interpreter Core | Versions: | Python 3.7 |
process
Status: | closed | Resolution: | duplicate |
---|---|---|---|
Dependencies: | Superseder: | Py_DecodeLocale() fails if used before the runtime is initialized. View:32096 | |
Assigned To: | Nosy List: | Decorater, eric.snow, ncoghlan, ned.deily, serhiy.storchaka, vstinner | |
Priority: | release blocker | Keywords: |
Created on 2017-11-20 14:21 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Messages (7) | ||
---|---|---|
msg306544 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2017-11-20 14:21 |
See the python-dev thread: https://mail.python.org/pipermail/python-dev/2017-November/150605.html | ||
msg306588 - (view) | Author: Decorater (Decorater) * | Date: 2017-11-20 21:46 |
For me, it looks like Py_DecodeLocal() is still safe (according to python 3.6.3 unless anything changed in it). | ||
msg306589 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2017-11-20 21:46 |
> For me, it looks like Py_DecodeLocal() is still safe (according to python 3.6.3 unless anything changed in it). This issue is a regression in Python 3.7. | ||
msg306590 - (view) | Author: Decorater (Decorater) * | Date: 2017-11-20 21:49 |
Ah, I see now. | ||
msg306615 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2017-11-21 02:06 |
Issue 32096 covers reverting the change to PyDecode_Locale specifically for 3.7. We can use this issue to ask the broader question "Do we want to *deprecate* our previously implied support for calling PyDecode_Locale() before Py_Initialize()?" If the answer is "Yes", then we need to design a transition plan to a different API for setting config parameters that accept "wchar_t *". If the answer is "No", then we need to document that design constraint on the affected APIs. Either way, we should also improve the way we communicate the list of C API methods that can be safely called before Py_Initialize. | ||
msg306632 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-11-21 07:35 |
Is there a *need* to break existing code? What is the benefit and how large it in comparison with the necessary of rewriting every code that embeds Python (and supporting both ways for long time)? | ||
msg306657 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2017-11-21 15:49 |
I mark this issue as a duplicate of bpo-32096. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:54 | admin | set | github: 76267 |
2017-11-21 15:50:27 | vstinner | unlink | issue32096 superseder |
2017-11-21 15:49:51 | vstinner | set | status: open -> closedsuperseder: Py_DecodeLocale() fails if used before the runtime is initialized.messages: + resolution: duplicatestage: resolved |
2017-11-21 07:35:15 | serhiy.storchaka | set | nosy: + serhiy.storchakamessages: + |
2017-11-21 02:06:06 | ncoghlan | set | nosy: + ncoghlanmessages: + |
2017-11-20 22:06:33 | vstinner | link | issue32096 superseder |
2017-11-20 21:49:26 | Decorater | set | messages: + |
2017-11-20 21:46:59 | vstinner | set | messages: + |
2017-11-20 21:46:07 | Decorater | set | nosy: + Decoratermessages: + |
2017-11-20 16:09:53 | serhiy.storchaka | set | priority: normal -> release blockernosy: + ned.deily |
2017-11-20 15:54:17 | eric.snow | set | nosy: + eric.snow |
2017-11-20 14:21:16 | vstinner | create |