-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-43258: Prevent needless allocation of sqlite3 aggregate context for empty queries #24569
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
Conversation
@berkerpeksag If you don't mind, I'd like to create a follow-up PR for this issue:
Code coverage is close to 100% for the final callback, so a refactor should be pretty safe. |
This sounds good to me.
I'm not sure about this one. Can you send an inline diff? The function is quite short so I don't see a net gain from a quick look at it. |
Thank you! |
Thanks for reviewing, @berkerpeksag!
There's a lot of such scoping "errors" in the sqlite3 module. I'm thinking of fixing all in one fairly large PR. I'll make these two static for now.
Sure! Here it is. Try it out. I believe it's worth it wrt. future maintenance.
|
Sorry, it's pretty much of a rewrite of a pretty short function :) IMO, not worth the code churn. If we ever need to rewrite these functions, it might make sense to do it this way. For now, I prefer keeping it as is. |
I'm not giving up; I'll try to sneak it in later ;) |
https://bugs.python.org/issue43258