Skip to content
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

Merged
merged 1 commit into from Dec 15, 2019

Conversation

isidentical
Copy link
Sponsor Member

@isidentical isidentical commented Oct 29, 2019

Doc/reference/datamodel.rst Outdated Show resolved Hide resolved
@ammaraskar
Copy link
Member

ammaraskar commented Nov 15, 2019

hmm, now that I think about this more. I think more appropriate wording would be:

co_stacksize is the largest size the stack will grow to when executing the function;

@isidentical
Copy link
Sponsor Member Author

isidentical commented Nov 15, 2019

@ammaraskar can you check it now?

Copy link
Member

@ammaraskar ammaraskar left a comment

LGTM with final suggestion

Doc/reference/datamodel.rst Outdated Show resolved Hide resolved
@ammaraskar
Copy link
Member

ammaraskar commented Nov 15, 2019

@vstinner Would you mind taking a look at this?

Copy link
Member

@vstinner vstinner left a comment

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_stacksize is 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).

@bedevere-bot
Copy link

bedevere-bot commented Dec 14, 2019

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@isidentical
Copy link
Sponsor Member Author

isidentical commented Dec 15, 2019

I have made the requested changes; please review again

@bedevere-bot
Copy link

bedevere-bot commented Dec 15, 2019

Thanks for making the requested changes!

@vstinner: please review the changes made to this pull request.

@miss-islington
Copy link
Contributor

miss-islington commented Dec 15, 2019

Thanks @isidentical for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Dec 15, 2019

Thanks @isidentical for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Dec 15, 2019

Sorry, @isidentical and @vstinner, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker d587272fe3b0fcad2f23a490e76f9f82ca7d64ef 3.7

@miss-islington
Copy link
Contributor

miss-islington commented Dec 15, 2019

Sorry @isidentical and @vstinner, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker d587272fe3b0fcad2f23a490e76f9f82ca7d64ef 3.8

@vstinner
Copy link
Member

vstinner commented Dec 15, 2019

@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".

@vstinner
Copy link
Member

vstinner commented Dec 18, 2019

Ping @isidentical, tell me if you prefer that I do the backport.

@isidentical
Copy link
Sponsor Member Author

isidentical commented Dec 19, 2019

Thanks for the ping @vstinner, I totally forgot backports. Sending them right away

isidentical added a commit to isidentical/cpython that referenced this pull request Dec 19, 2019
(cherry picked from commit d587272)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
@bedevere-bot
Copy link

bedevere-bot commented Dec 19, 2019

GH-17660 is a backport of this pull request to the 3.7 branch.

isidentical added a commit to isidentical/cpython that referenced this pull request Dec 19, 2019
(cherry picked from commit d587272)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
@bedevere-bot
Copy link

bedevere-bot commented Dec 19, 2019

GH-17661 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit that referenced this pull request Dec 19, 2019
(cherry picked from commit d587272)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>





https://bugs.python.org/issue38316



Automerge-Triggered-By: @vstinner
miss-islington pushed a commit that referenced this pull request Dec 19, 2019
(cherry picked from commit d587272)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>





https://bugs.python.org/issue38316



Automerge-Triggered-By: @vstinner
@isidentical isidentical deleted the bpo-38316 branch Dec 19, 2019
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants