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

GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused #121428

Merged
merged 8 commits into from
Jul 10, 2024

Conversation

satori1995
Copy link
Contributor

@satori1995 satori1995 commented Jul 6, 2024

In the maybe_freelist_push function, PyTupleObjects with an ob_size of 20 are being stored in the free_list for potential reuse. However, in the maybe_freelist_pop function, these objects aren't actually being reused.

@bedevere-app
Copy link

bedevere-app bot commented Jul 6, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@eendebakpt
Copy link
Contributor

Nice catch! Can you create an issue for this change? See https://devguide.python.org/getting-started/pull-request-lifecycle/#quick-guide

@bedevere-app
Copy link

bedevere-app bot commented Jul 6, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@satori1995
Copy link
Contributor Author

satori1995 commented Jul 6, 2024

Nice catch! Can you create an issue for this change? See https://devguide.python.org/getting-started/pull-request-lifecycle/#quick-guide

Sure, I've created an issue for this change.

@satori1995 satori1995 changed the title Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused Jul 6, 2024
@eendebakpt
Copy link
Contributor

@satori1995 Thanks! Could you also write a news item using the blurb tool?

@satori1995
Copy link
Contributor Author

@eendebakpt All done

Copy link
Contributor

@eendebakpt eendebakpt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Tuples with size 20 are probably not very common, but since the freelist is allocated for them let's use it when possible.

…e-121439.jDHod3.rst

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@satori1995
Copy link
Contributor Author

@eendebakpt Hi, When will this submission be merged? Is there anything else I need to do?

@eendebakpt
Copy link
Contributor

@eendebakpt Hi, When will this submission be merged? Is there anything else I need to do?

One of the CI tests is still failing (formatting of the news entry). If that is fixed all CI checks should be green.

The PR needs to be reviewed and approved by a core developer in order to be merged. It can take some time before this happens though, as there are many issues and PRs requiring attention.

@corona10 corona10 self-assigned this Jul 9, 2024
@corona10 corona10 added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jul 9, 2024
Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes looks good to me but please fix the linter issue.
https://github.com/python/cpython/actions/runs/9836190774/job/27151370914?pr=121428

@bedevere-app
Copy link

bedevere-app bot commented Jul 9, 2024

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.

…e-121439.jDHod3.rst


I have made the requested changes

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@satori1995
Copy link
Contributor Author

satori1995 commented Jul 9, 2024

@corona10 @eendebakpt Sorry,I have made the requested changes,but I don't understand why there are still three checks failing. Just to mention, this is my first time contributing code to CPython, so I'm not very clear on some of the details.

satori1995

This comment was marked as duplicate.

@eendebakpt
Copy link
Contributor

@satori1995 Failing docs test could be due do the formatting in the news entry, although I am not sure as the error message does not show any line our text of the news entry in this PR. Could you rebase your branch onto latest dev? (in github there is a button "Update branch" for this). Maybe that resolves the failing test.

satori1995 and others added 2 commits July 10, 2024 10:06
@eendebakpt
Copy link
Contributor

@satori1995 The failing checks we can resolve, your part of the PR looks good. Could you sync your PR the the main branch? (the Update branch button)

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@corona10 corona10 enabled auto-merge (squash) July 10, 2024 07:27
@corona10 corona10 merged commit 9585a1a into python:main Jul 10, 2024
37 of 38 checks passed
@miss-islington-app
Copy link

Thanks @satori1995 for the PR, and @corona10 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 10, 2024
…ee_list to be reused (pythongh-121428)

(cherry picked from commit 9585a1a)

Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 10, 2024
…ee_list to be reused (pythongh-121428)

(cherry picked from commit 9585a1a)

Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 10, 2024

GH-121565 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 10, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jul 10, 2024

GH-121566 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jul 10, 2024
corona10 pushed a commit that referenced this pull request Jul 10, 2024
…ree_list to be reused (gh-121428) (#121566)

GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428)
(cherry picked from commit 9585a1a)

Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
corona10 pushed a commit that referenced this pull request Jul 10, 2024
…ree_list to be reused (gh-121428) (gh-121565)

GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428)
(cherry picked from commit 9585a1a)

Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
@corona10
Copy link
Member

noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants