-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-43852: Improve tuple creation in sqlite3 #25421
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
bpo-43852: Improve tuple creation in sqlite3 #25421
Conversation
skip news |
cf6480b
to
cfbb0c5
Compare
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.
I don't think the title of the PR is accurate. My understanding is that "harden tuple creation" would mean checking return value of each PyTuple_SetItem
calls and Py_DECREF
any objects if needed. This PR simply replaces PyTuple_SetItem
calls with a macro that doesn't do any error checking. I'm fine with the PR as is, but I don't think it would harden tuple creation as it claimed.
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 And if you don't make the requested changes, you will be put in the comfy chair! |
I agree. I started out adding error checking to EDIT Nitpick: I don't like the variable name |
Thanks for reviewing, @berkerpeksag! I have made the requested changes; please review again. |
Thanks for making the requested changes! @berkerpeksag: please review the changes made to this pull request. |
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.
These are the changes I hesitated to make.
Thank you for reviewing, @serhiy-storchaka ! |
Let me know if there are other changes you want me to address, @berkerpeksag. |
Thanks for reviewing, @methane! |
Thank you! |
PyTuple_SET_ITEM
iso.PyTuple_SetItem
_pysqlite_query_execute
, minimise decref's in case of errorhttps://bugs.python.org/issue43852