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
Contributor

isidentical commented Oct 29, 2019

Doc/reference/datamodel.rst Outdated Show resolved Hide resolved
@isidentical isidentical force-pushed the isidentical:bpo-38316 branch from 728a886 to 95c86b9 Oct 30, 2019
@isidentical isidentical requested a review from ammaraskar Nov 15, 2019
@ammaraskar

This comment has been minimized.

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 isidentical force-pushed the isidentical:bpo-38316 branch from 95c86b9 to 09b25b1 Nov 15, 2019
@isidentical

This comment has been minimized.

Copy link
Contributor Author

isidentical commented Nov 15, 2019

@ammaraskar can you check it now?

Copy link
Member

ammaraskar left a comment

LGTM with final suggestion

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

This comment has been minimized.

Copy link
Member

ammaraskar commented Nov 15, 2019

@vstinner Would you mind taking a look at this?

Copy link
Member

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

This comment has been minimized.

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 isidentical force-pushed the isidentical:bpo-38316 branch from abbc1f1 to da1ab34 Dec 15, 2019
@isidentical

This comment has been minimized.

Copy link
Contributor Author

isidentical commented Dec 15, 2019

I have made the requested changes; please review again

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 15, 2019

Thanks for making the requested changes!

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

@bedevere-bot bedevere-bot requested a review from vstinner Dec 15, 2019
@vstinner vstinner merged commit d587272 into python:master Dec 15, 2019
4 checks passed
4 checks passed
Azure Pipelines PR #20191215.2 succeeded
Details
bedevere/issue-number Issue number 38316 found
Details
bedevere/news "skip news" label found
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

vstinner commented Dec 18, 2019

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

@isidentical

This comment has been minimized.

Copy link
Contributor 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

This comment has been minimized.

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

This comment has been minimized.

Copy link

bedevere-bot commented Dec 19, 2019

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

miss-islington added 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 added 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 isidentical:bpo-38316 branch Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.