bpo-32096: Remove obj and mem from _PyRuntime#4532
Merged
vstinner merged 7 commits intopython:masterfrom Nov 24, 2017
vstinner:pymem_revert
Merged
bpo-32096: Remove obj and mem from _PyRuntime#4532vstinner merged 7 commits intopython:masterfrom vstinner:pymem_revert
vstinner merged 7 commits intopython:masterfrom
vstinner:pymem_revert
Conversation
bpo-32096, bpo-30860: Partially revert the commit 2ebc5ce: * Move structures back from Include/internal/mem.h to Objects/obmalloc.c * Remove _PyObject_Initialize() and _PyMem_Initialize() * Remove Include/internal/pymalloc.h PyMem_RawMalloc() and Py_DecodeLocale() can be called again before _PyRuntimeState_Init().
ncoghlan
previously requested changes
Nov 24, 2017
Contributor
ncoghlan
left a comment
There was a problem hiding this comment.
While I'm +1 for this reversion, it should have a NEWS entry, since it's reverting changes that were published in previous alpha releases.
It should also incorporate @ericsnowcurrently's new test case from https://github.com/python/cpython/pull/4495/files#diff-559231a69a7d7f06ab48269b3bfa1f45, to confirm that it actually is fixing the regression it's intended to fix.
|
When you're done making the requested changes, leave the comment: |
Make sure that it's possible to call Py_DecodeLocale(), and then call Py_SetProgramName() with the decoded string, before Py_Initialize(). Co-Authored-By: Eric Snow <[email protected]>
I added the NEWS entry and copied Eric's unit test
ncoghlan
reviewed
Nov 24, 2017
| @@ -0,0 +1,4 @@ | |||
| Revert memory allocator changes in the C API: move structures back from | |||
| _PyRuntime to Objects/obmalloc.c. The memory allocators are now initialized | |||
| again statically, and so PyMem_RawMalloc() and Py_DecodeLocale() can be | |||
Contributor
There was a problem hiding this comment.
Slight grammar tweak: "now initialized again" -> "once again initialized"
This was referenced Nov 24, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bpo-32096, bpo-30860: Partially revert the commit
2ebc5ce:
Objects/obmalloc.c
PyMem_RawMalloc() and Py_DecodeLocale() can be called again before
_PyRuntimeState_Init().
https://bugs.python.org/issue32096