GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [minor code fix] Remove redundant reset() by gstein · Pull Request #26015 · python/cpython

Conversation

@gstein

@gstein gstein commented May 10, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 ]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gstein
Remove redundant reset()
80c83f6
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

the-knights-who-say-ni commented May 10, 2021

Copy link
Copy Markdown

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting review label May 10, 2021
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label May 10, 2021
@gstein

gstein commented May 10, 2021

Copy link
Copy Markdown
Contributor Author

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

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fidget-Spinner
Fidget-Spinner requested a review from erlend-aasland May 10, 2021 12:10
@erlend-aasland

erlend-aasland commented May 10, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented May 10, 2021

Copy link
Copy Markdown
Contributor

Also, see GH-24681.

gstein reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gstein gstein mentioned this pull request May 10, 2021
bpo-43350: Don't reset active statements twice in _pysqlite_query_execute() #24681
Closed
@gstein

gstein commented May 10, 2021

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented May 10, 2021

Copy link
Copy Markdown
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 reacted with confused emoji
All reactions
  • 😕 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gstein

gstein commented May 10, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@berkerpeksag

berkerpeksag commented May 10, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented May 10, 2021

Copy link
Copy Markdown
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.

gstein reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented May 10, 2021

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gstein

gstein commented May 10, 2021

Copy link
Copy Markdown
Contributor Author

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

erlend-aasland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-knights-who-say-ni the-knights-who-say-ni added CLA signed and removed CLA not signed labels May 13, 2021
@github-actions

github-actions Bot commented Jun 13, 2021

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Jun 13, 2021
@ezio-melotti ezio-melotti removed the CLA signed label Jul 13, 2022
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Aug 7, 2022
@erlend-aasland

erlend-aasland commented Sep 4, 2022

Copy link
Copy Markdown
Contributor

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

gstein reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland closed this Sep 4, 2022
@gstein

gstein commented Sep 4, 2022

Copy link
Copy Markdown
Contributor Author

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

erlend-aasland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

Reviewers

@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@gstein @the-knights-who-say-ni @erlend-aasland @berkerpeksag @ezio-melotti @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.