-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused #121428
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
Conversation
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 |
Nice catch! Can you create an issue for this change? See https://devguide.python.org/getting-started/pull-request-lifecycle/#quick-guide |
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 |
Sure, I've created an issue for this change. |
@satori1995 Thanks! Could you also write a news item using the blurb tool? |
@eendebakpt All done |
There was a problem hiding this 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.
Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst
Outdated
Show resolved
Hide resolved
…e-121439.jDHod3.rst Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@eendebakpt Hi, When will this submission be merged? Is there anything else I need to do? |
Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst
Outdated
Show resolved
Hide resolved
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. |
There was a problem hiding this 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
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 |
…e-121439.jDHod3.rst I have made the requested changes Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@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 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. |
Misc/NEWS.d/next/Core and Builtins/2024-07-08-02-24-55.gh-issue-121439.jDHod3.rst
Outdated
Show resolved
Hide resolved
…e-121439.jDHod3.rst Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks @satori1995 for the PR, and @corona10 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…ee_list to be reused (pythongh-121428) (cherry picked from commit 9585a1a) Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
…ee_list to be reused (pythongh-121428) (cherry picked from commit 9585a1a) Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
GH-121565 is a backport of this pull request to the 3.13 branch. |
GH-121566 is a backport of this pull request to the 3.12 branch. |
…ee_list to be reused (pythongh-121428)
…ee_list to be reused (pythongh-121428)
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 themaybe_freelist_pop
function, these objects aren't actually being reused.