Skip to content

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commented May 31, 2021

@erlend-aasland
Copy link
ContributorAuthor

cc. @vstinner

@bedevere-bot
Copy link

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.

Erlend E. Aasland added 2 commits June 1, 2021 09:26
By allocating and tracking creation of statement object in pysqlite_statement_create(), the caller does not need to worry about GC syncronization, and eliminates the possibility of getting a badly created object. All related fault handling is moved to pysqlite_statement_create().
Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM, but I would like to see the minor issues being addressed first before merging your change.

Erlend Egeberg Aaslandand others added 2 commits June 1, 2021 12:13
Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

@vstinnervstinner merged commit fffa0f9 into python:mainJun 1, 2021
@vstinner
Copy link
Member

Merged, thanks.

@erlend-aaslanderlend-aasland deleted the sqlite-track-stmt branch June 1, 2021 10:51
@erlend-aasland
Copy link
ContributorAuthor

Merged, thanks.

Thanks for reviewing, Victor & Pablo!

@MariattaMariatta added needs backport to 3.10 only security fixes and removed needs backport to 3.10 only security fixes labels Jun 2, 2021
@miss-islington
Copy link
Contributor

Thanks @erlend-aasland for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @erlend-aasland and @vstinner, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker fffa0f92adaaed0bcb3907d982506f78925e9052 3.10

@vstinner
Copy link
Member

@erlend-aasland: Automated backport to 3.10 failed, can you try to backport the change manually?

@pablogsal: I'm not sure if this change is really a bugfix or an enhancement. I'm ok to backport it even after beta2 release.

@erlend-aasland
Copy link
ContributorAuthor

@erlend-aasland: Automated backport to 3.10 failed, can you try to backport the change manually?

Will do!

erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull request Jun 3, 2021
Allocate and track statement objects in pysqlite_statement_create. By allocating and tracking creation of statement object in pysqlite_statement_create(), the caller does not need to worry about GC syncronization, and eliminates the possibility of getting a badly created object. All related fault handling is moved to pysqlite_statement_create(). Co-authored-by: Victor Stinner <[email protected]>. (cherry picked from commit fffa0f9) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
@bedevere-botbedevere-bot removed the needs backport to 3.10 only security fixes label Jun 3, 2021
@bedevere-bot
Copy link

GH-26515 is a backport of this pull request to the 3.10 branch.

vstinner pushed a commit that referenced this pull request Jun 3, 2021
Allocate and track statement objects in pysqlite_statement_create. By allocating and tracking creation of statement object in pysqlite_statement_create(), the caller does not need to worry about GC syncronization, and eliminates the possibility of getting a badly created object. All related fault handling is moved to pysqlite_statement_create(). Co-authored-by: Victor Stinner <[email protected]>. (cherry picked from commit fffa0f9) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@erlend-aasland@bedevere-bot@vstinner@miss-islington@pablogsal@Mariatta@the-knights-who-say-ni