-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
[minor code fix] Remove redundant reset() #26015
Conversation
pysqlite_statement_reset() is being called twice. Nuke one, and add a `(void)` to the call to be explicit that we're tossing the result code.
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
CLA is in-process. I am also a historic committer. |
Hi, and thanks for the PR. Please take a look at Serhiy's comment in msg387858 in issue 43350: |
Also, see GH-24681. |
Thank you! I had not seen that other work. This seems like a straightforward fix. ... ?? |
That's what I thought too :) However, Serhiy and Berker disagrees, so I guess the redundant reset stays for now. |
Silly choice, because clearly it makes observers (such as myself) curious and wastes their time. Justification for keeping the redundancy seems warranted. Otherwise, you'll get this PR, and #24681 and bpo-43350 rolling in, repeatedly. ... Total waste of community energy, for no reason. (I'm already confused on spending this much effort to toss a few lines of code) ping: @serhiy-storchaka and @berkerpeksag |
Well, we all are volunteers and we don't have the time to verify every single observers low effort pull requests. It's your responsibility to do your own research before submitting your PR (so you'd find out that you need to create a BPO issue for this type of change and that bpo-43350 exists) More importantly, telling people who maintain this piece of code that their decision is silly won't help your case. |
Greg, I've started to dig through the pysqlite repo in search for an answer to the redundancy. I've added links to relevant commits in the bpo. |
@berkerpeksag I've done some research. Please see the bpo. |
Just trying to help clean up the codebase. Thank you @erlend-aasland for your effort! ... back in the day, I'd simply make a commit to the Python codebase. But somewhere in the many version control moves, my commit privileges got dropped. So it goes... |
This PR is stale because it has been open for 30 days with no activity. |
Closing this, as the current code was rewritten in #30379. Thanks, nonetheless, for the PR, Greg! |
Not a problem @erlend-aasland ... I looked at #30379, and yeah: this PR is redundant. ... You've been quite thorough! Good work. |
pysqlite_statement_reset() is being called twice. Nuke one, and add a
(void)
to the remaining call to be explicit that we're tossing the result code.[ note: a bug is not being fixed, so the "skip issue" label is appropriate here ]