You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quoting msg400205 by Petr in bpo-42064:
I think the module could use a more comprehensive review for GIL handling, rather than doing it piecewise in individual PRs. I recommend that any function passed to SQLite (and only those) should
use intermingled declarations in the affected functions; this will make GIL acquisition stand more out, and it also improves readability and makes it easier to trace refs
take the naming step further: I'd like to normalise PyObject * callback variable names, the extremely long function_pinboard_* names, and also drop the C callback prefixes ('_' and 'pysqlite_')
If you agree, I'll create separate PR's for those; one for each refactor. I think it will enhance readability a lot.
The general policy is to only improve style for code you touch for some other reasons. You're changing lots of the callback code in bpo-42064, so I reckon making things more readable is fine.
We'll do the changes Petr proposed first, and then I'll see how invasive the other changes will be. If the diffs end up being concise, I'll put them up for review :)
Activity
erlend-aasland commentedon Aug 24, 2021
Quoting msg400205 by Petr in bpo-42064:
I think the module could use a more comprehensive review for GIL handling, rather than doing it piecewise in individual PRs. I recommend that any function passed to SQLite (and only those) should
*_callback, for clarityerlend-aasland commentedon Aug 24, 2021
I'd like to propose further enhancements:
If you agree, I'll create separate PR's for those; one for each refactor. I think it will enhance readability a lot.
[-][sqlite3] cleanup GIL handling[/-][+][sqlite3] cleanup callbacks (GIL handling, naming, ...)[/+][-][sqlite3] cleanup GIL handling[/-][+][sqlite3] cleanup callbacks (GIL handling, naming, ...)[/+]encukou commentedon Aug 25, 2021
The general policy is to only improve style for code you touch for some other reasons. You're changing lots of the callback code in bpo-42064, so I reckon making things more readable is fine.
corona10 commentedon Aug 25, 2021
Obviously, this case could be code churn(we don't accept normally), but if other core-dev agree with the changes. I am fine.
erlend-aasland commentedon Aug 25, 2021
We'll do the changes Petr proposed first, and then I'll see how invasive the other changes will be. If the diffs end up being concise, I'll put them up for review :)
miss-islington commentedon Aug 31, 2021
New changeset 001ef46 by Erlend Egeberg Aasland in branch 'main':
bpo-44991: Make GIL handling more explicit in
sqlite3callbacks (GH-27934)001ef46
encukou commentedon Sep 7, 2021
New changeset 0474d06 by Erlend Egeberg Aasland in branch 'main':
bpo-44991: Normalise
sqlite3callback naming (GH-28088)0474d06
encukou commentedon Sep 7, 2021
The remaining function_pinboard_* renames are part of PR-27940.
encukou commentedon Oct 12, 2021
New changeset cfb1df3 by Erlend Egeberg Aasland in branch 'main':
bpo-44991: Normalise function and collation callback naming (GH-28209)
cfb1df3