GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — gh-103489: Add get/set config methods to sqlite3.Connection by erlend-aasland · Pull Request #103506 · python/cpython Conversation
|
|
cc. @simonw / @numist: proof of concept; feel free to test. I deliberately did not add support for SQLITE_DBCONFIG_MAINDBNAME and SQLITE_DBCONFIG_LOOKASIDE. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2ac3ccc to
ba82098
Compare
ba82098 to
6fc9124
Compare
There was an error while loading. Please reload this page.
|
Good call on I'm surprised to see |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@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? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
This looks like a reasonable solution to me, but I'm not an SQLite expert :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Docs approval!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks everybody! I'll land this later today. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Exposesqlite3_db_config and verbs (or equivalent)
There was an error while loading. Please reload this page.