Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

gstein
Copy link

@gstein gstein commented May 10, 2021

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 ]

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.
@gstein gstein requested a review from berkerpeksag as a code owner May 10, 2021 11:14
@the-knights-who-say-ni
Copy link

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 Missing

Our records indicate the following people have not signed the CLA:

@gstein

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
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@gstein
Copy link
Author

gstein commented May 10, 2021

CLA is in-process. I am also a historic committer.

@erlend-aasland
Copy link
Contributor

erlend-aasland commented May 10, 2021

Hi, and thanks for the PR. Please take a look at Serhiy's comment in msg387858 in issue 43350:
"Maybe the code could be rewritten in more explicit way and call pysqlite_statement_reset() only when it is necessary, but for now I don't think that just removing one call will make the code better."

@erlend-aasland
Copy link
Contributor

Also, see GH-24681.

@gstein
Copy link
Author

gstein commented May 10, 2021

Thank you! I had not seen that other work. This seems like a straightforward fix. ... ??

@erlend-aasland
Copy link
Contributor

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.

@gstein
Copy link
Author

gstein commented May 10, 2021

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

@berkerpeksag
Copy link
Member

berkerpeksag commented May 10, 2021

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.

@erlend-aasland
Copy link
Contributor

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.

@erlend-aasland
Copy link
Contributor

@berkerpeksag I've done some research. Please see the bpo.

@gstein
Copy link
Author

gstein commented May 10, 2021

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...

@github-actions
Copy link

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 Jun 13, 2021
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Aug 7, 2022
@erlend-aasland
Copy link
Contributor

Closing this, as the current code was rewritten in #30379. Thanks, nonetheless, for the PR, Greg!

@gstein
Copy link
Author

gstein commented Sep 4, 2022

Not a problem @erlend-aasland ... I looked at #30379, and yeah: this PR is redundant. ... You've been quite thorough! Good work.

@gstein gstein deleted the patch-1 branch September 4, 2022 22:42
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.

6 participants