[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Closing this. Thanks, Ned and Eric! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 0ae22577606f1b52e3b6c2de6c5b307518044605 by Erlend Egeberg Aasland in branch '3.9': [3.9] bpo-46402: Promote SQLite URI tricks in sqlite3 docs (GH-30660) (#30672) https://github.com/python/cpython/commit/0ae22577606f1b52e3b6c2de6c5b307518044605

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 01e6cbefd3d0f60c942ed711131f5d638dde1227 by Erlend Egeberg Aasland in branch '3.10': [3.10] bpo-46402: Promote SQLite URI tricks in sqlite3 docs (GH-30660) (GH-30671) https://github.com/python/cpython/commit/01e6cbefd3d0f60c942ed711131f5d638dde1

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > BTW, I'm fine with this being closed, since the functionality I wanted is > available and documented. Great. I was considering closing it as soon as the backports have landed (I had to manually fix them bco. make suspicious failures). -- _

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Ned Batchelder
Ned Batchelder added the comment: BTW, I'm fine with this being closed, since the functionality I wanted is available and documented. -- ___ Python tracker ___ __

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +28872 pull_request: https://github.com/python/cpython/pull/30672 ___ Python tracker ___ ___

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +28871 pull_request: https://github.com/python/cpython/pull/30671 ___ Python tracker ___ ___

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset bdf2ab1887a2edfb089a3c2a1590cf1e84ea0048 by Erlend Egeberg Aasland in branch 'main': bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660) https://github.com/python/cpython/commit/bdf2ab1887a2edfb089a3c2a1590cf1e84ea0048 --

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +28863 pull_request: https://github.com/python/cpython/pull/30662 ___ Python tracker ___ __

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28862 pull_request: https://github.com/python/cpython/pull/30661 ___ Python tracker _

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I created GH-30660 in order to try to enhance the docs. Ned and Eric, would you mind taking a look at the PR? -- ___ Python tracker ___ _

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +28861 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30660 ___ Python tracker ___

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I guess we could do more to promote that trick in the docs. It’s quite useful. -- ___ Python tracker ___ __

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Ned Batchelder
Ned Batchelder added the comment: @Erlend: thanks for the URI tip, I missed that as a possibility in the SQLite docs. -- ___ Python tracker ___ __

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: OTOH, implementing an API similar to apsw (adding a flags keyword) would make it easier for users to switch between that and the stdlib sqlite3. -- ___ Python tracker __

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: IMO, the URI "API" is not very pythonic; I have to look up the format every time I'm using it. OTOH, introducing flags, or keywords, for every option will add a lot of code. -- ___ Python tracker

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See also bpo-24887. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI, you can already do this using the URI option: cx = sqlite3.connect("file:test.db?mode=rw", uri=True) -- ___ Python tracker ___ _

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-16 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that would be a useful option. -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-16 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +erlendaasland, zach.ware stage: -> needs patch type: -> enhancement versions: +Python 3.11 ___ Python tracker ___ _

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-16 Thread Ned Batchelder
New submission from Ned Batchelder : The sqlite3 library implicitly creates the database if the requested file doesn't exist. I would like to be able to avoid that implicit creation. (Actually, it would be enough to know whether I had created the database, but the underlying SQLite library