New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-38316: describe co_stacksize a little bit better #16983
Conversation
|
hmm, now that I think about this more. I think more appropriate wording would be:
|
|
@ammaraskar can you check it now? |
|
@vstinner Would you mind taking a look at this? |
Objects/frameobject.c allocates an array of code->co_stacksize + code->co_nlocals + ncells + nfrees items. The array size doesn't chagne during the execution of the function, it's not like x86 machine mode which manipulates the stack pointer (SP) register and use PUSH/POP.
:attr:
co_stacksizeis the required stack size (including local variables)
So this definition sounds wrong to me.
Instead, I suggest this definition:
:attr:`co_stacksize` is the required stack size
=> just remove (including local variables).
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
|
Thanks @isidentical for the PR, and @vstinner for merging it |
|
Thanks @isidentical for the PR, and @vstinner for merging it |
|
Sorry, @isidentical and @vstinner, I could not cleanly backport this to |
|
Sorry @isidentical and @vstinner, I had trouble checking out the |
|
@isidentical: The automated backport to 3.7 and 3.8 failed. Can you please try to manually backport these changes? Use " cherry_picker d587272 3.8" or "git cherry-pick -x d587272". |
|
Ping @isidentical, tell me if you prefer that I do the backport. |
|
Thanks for the ping @vstinner, I totally forgot backports. Sending them right away |
(cherry picked from commit d587272) Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
|
GH-17660 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit d587272) Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
|
GH-17661 is a backport of this pull request to the 3.8 branch. |
https://bugs.python.org/issue38316