gh-103489: Add get/set config methods to sqlite3.Connection#103506
gh-103489: Add get/set config methods to sqlite3.Connection#103506erlend-aasland merged 11 commits intopython:mainfrom
Conversation
dfce455 to
2ac3ccc
Compare
2ac3ccc to
ba82098
Compare
ba82098 to
6fc9124
Compare
|
Good call on I'm surprised to see |
Well, those two are the only ones with non-standard arg spec, so by keeping them out we get a cleaner API. They are also pretty esoteric features IMO, so I'm not sure they're worth the added complexity.
Thanks, you're quite correct; there's no reason to expose that constant. |
Fair enough, though it seems like this runs a risk the SQLite project adds a desirable verb with non-int parameters in the future. I don't see an API analogue for There's still a type risk here—SQLite has a history of adding third options to formerly boolean configurations (like Footnotes
|
Yep, that's a risk, but we can expand the scope of the new Python API later, so it's not too big of a risk. Another option is of course the namespace design you hinted at.
The problem with that SQLite C API, is that it must be called prior to SQLite initialisation. Currently, that happens during
Anyway, this discussion is off-topic for this PR :) If you want to follow this up, please create a topic on Discourse; we can continue there. |
A namespace could of course be an option, but I think a simple get/set pair is a cleaner API for this feature (both programmatically and regarding to documentation). (Also, we've already got |
|
@AlexWaygood: The added docs are quite sparse, but I'm hesitant to explode this PR by documenting every single constant. I've added a link to the SQLite docs, maybe that is enough. What do you think? |
This looks like a reasonable solution to me, but I'm not an SQLite expert :) |
|
Thanks everybody! I'll land this later today. |
sqlite3_db_configand verbs (or equivalent) #103489