-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Support sqlite3 uri filenames #57982
Comments
URIs are an extensible way to pass options to SQLite. See: Patch adds a keyword argument "uri" to sqlite3.connect which causes the filename to be parsed as a URI if set to True. |
Hi, I will let others discuss the feature itself, here are already some comments about your patch:
|
Thanks for your comments. You're right, I didn't consider positional arguments. Here's a patch that addresses your comments. Should I also rewrap modified lines that were already much too long? I also noticed & fixed an unrelated typo in Lib/sqlite3/test/hooks.py... |
I think the doc could link to the sqlite.org doc about URIs. |
Opened bpo-13934.
I considered this, but the rest of the sqlite3 module documentation doesn't link to the sqlite.org doc pages either. There is only a link to http://www.sqlite.org under 'See also'. |
[Amaury]
[poq]
By the way, do you want to give us your full name so that we can credit you? (And on a related subject, I don’t know if this small patch requires a contributor agreement.) |
They've already added a new option ('psow') since I opened this report, so linking is probably more future-proof. I've added an updated patch which adds a link. I've also changed the exception when URIs are not supported to sqlite3.NotSupportedError.
I prefer anonymity. :) |
|
A question concerning this patch: is this going to be applied only to 3.3 or to 2.7 as well? Python-2.7.x also does not have this functionality which would be interesting to get. |
2.7 and 3.2 are stable versions which only get bug fixes. 3.3 is in release candidate stage, so this new feature can only go into 3.4. See the devguide and PEPs for more info about the process we follow. |
This would definitely be useful. I would have liked to have this feature today. |
Here is an updated patch. |
New changeset f13bb1e40fbc by Antoine Pitrou in branch 'default': |
I've committed the patch, closing. |
You can use "p" format in PyArg_ParseTuple* for boolean parameters. |
That's what I used, indeed. |
Oh, I were blind. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: