-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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-1635741: sqlite3 now uses Py_NewRef and Py_XNewRef #23170
bpo-1635741: sqlite3 now uses Py_NewRef and Py_XNewRef #23170
Conversation
FYI, CI hangs at |
You can ignore this known issue https://bugs.python.org/issue42142 The core dev who will merge your PR wil re-run the job. |
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 like node->key = Py_NewRef(key);
, it looks nice.
But I'm not sure about long lines like current_param = Py_XNewRef(PyDict_GetItemWithError(parameters, binding_name_obj));
which do many things at the same line:
- Call PyDict_GetItemWithError()
- Call Py_XNewRef()
- Assign current_param
Fixed in 8528bf6 |
Just created https://bugs.python.org/issue42287, then saw this PR, good work :) This I believe that such changes, when applied correctly (that is, if you did not change code semantics), should result in an identical binary. So a simple check to ensure you haven't broken anything would be to compare the final build before & after. P.S make sure to strip debug info, because it does change (line numbers, ...) @vstinner I think this PR (and future PRs regarding this conversion) do not require a news entry, right? because they do not introduce any user-facing change, only code enhancement and refactoring. |
@vstinner Would you like further changes, or are you fine with this PR as it stands? |
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.
@vstinner FYI, synced with |
Thanks for GH-23152, @vstinner! Fewer lines, improved readability: 7 files changed, 40 insertions, 87 deletions :)
Would you mind reviewing?
https://bugs.python.org/issue1635741