Skip to content

gh-144424: Clean up dead weakrefs to sqlite3 Blob objects#144435

Open
takluyver wants to merge 3 commits into
python:mainfrom
takluyver:sqlite-cleanup-blob-weakrefs
Open

gh-144424: Clean up dead weakrefs to sqlite3 Blob objects#144435
takluyver wants to merge 3 commits into
python:mainfrom
takluyver:sqlite-cleanup-blob-weakrefs

Conversation

@takluyver

@takluyver takluyver commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Using conn.blobopen() puts a weakref to the new blob object into a list, but dead weakrefs are never cleaned up.

This adds a check to go through and clean up dead weakrefs on every 200th blob opened, closely based on the code I removed in #144378 doing the same thing for Cursor weakrefs.

Closes #144424.

Comment thread Modules/_sqlite/connection.c Outdated
Comment thread Modules/_sqlite/connection.c Outdated
takluyver and others added 2 commits February 5, 2026 22:34
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 5, 2026
@takluyver

Copy link
Copy Markdown
Contributor Author

I made the requested changes from the previous review; should I be doing something to pass it back to reviewers? Or is it just a case of waiting for someone to have time? 🙂

@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite3 Blob objects leave behind weakrefs which are never cleaned up

2 participants