Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add missing gc_collect() calls in sqlite3 tests #127446

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

Merged

Conversation

cfbolz
Copy link
Contributor

@cfbolz cfbolz commented Nov 30, 2024

PyPy needs a gc_collect() call after the del cur statements for the cursors' finalizers to execute.

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

PyPy needs a gc_collect() call after the del cur statements for the cursors' finalizers to execute.

Thanks. I wonder if we should add a short "needed-for-pypy-comment" behind the gc_collect() calls.

@cfbolz
Copy link
Contributor Author

cfbolz commented Dec 1, 2024

I wonder if we should add a short "needed-for-pypy-comment" behind the gc_collect() calls.

It's also needed for all other Python implementations that don't use reference counting (GraalPy, for example). Also CPython is moving in the general direction of having less timely finalization (e.g. with deferred refcounting). So I don't think a comment that this is only for pypy is that helpful.

@cfbolz cfbolz merged commit 2a373da into python:main Dec 2, 2024
52 checks passed
@miss-islington-app
Copy link

Thanks @cfbolz for the PR 🌮🎉.. 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 Dec 2, 2024
(cherry picked from commit 2a373da)

Co-authored-by: CF Bolz-Tereick <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Dec 2, 2024

GH-127500 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 Dec 2, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 2, 2024
(cherry picked from commit 2a373da)

Co-authored-by: CF Bolz-Tereick <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Dec 2, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Dec 2, 2024
Yhg1s pushed a commit that referenced this pull request Dec 2, 2024
…127501)

add missing gc_collect() calls in sqlite3 tests (GH-127446)
(cherry picked from commit 2a373da)

Co-authored-by: CF Bolz-Tereick <[email protected]>
Yhg1s pushed a commit that referenced this pull request Dec 2, 2024
…127500)

add missing gc_collect() calls in sqlite3 tests (GH-127446)
(cherry picked from commit 2a373da)

Co-authored-by: CF Bolz-Tereick <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip issue skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants