This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jim.Jewett
Recipients Jeremy Banks, Jim.Jewett, Mark.Bucciarelli, Ronny.Pfannschmidt, adamtj, asvetlov, aymeric.augustin, bulb, dholth, flox, ghaering, monsanto, pitrou, r.david.murray, scott.urban, torsten, tshepang, zzzeek
Date 2014-06-15.01:29:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CA+OGgf68BcU0szym9Cqhk3HgtHF0r2xq48akF6PCXXVfgQwaXA@mail.gmail.com>
In-reply-to <1402733133.41.0.867246971562.issue10740@psf.upfronthosting.co.za>
Content
On Jun 14, 2014 4:05 AM, "Aymeric Augustin"

> preserving the same behavior by default

That is a requirement, because of backwards compatibility.

> providing more control for users who need a different behavior, for
instance people who use SQLite as an application file format or as a web
application storage backend.

Great ... but make sure it is also simpler.  It is already *possible* to do
what you want with 3rd party code.  So if doing it "right" would still
require an arcane recipe,  that isn't a gain.

At a minimum,  the new docs should explain why the current default is not
sufficient for an application file or a Web backend, and what to do
instead.  New code is only justified if it makes the "do this instead"
simpler and more obvious.

My personal opinion is still that adding more keywords won't do this,
because the old ones will still be there to confuse ... thus my suggestion
of a new function.

> > When starting with Python I always thought that code like this is
harmles:
>
>     >>> conn = sqlite3.connect("test.db")
>     >>> data = list(conn.execute("select * from mytable"))
>
> > Currently it is, but only because sqlite3 module parses the select as
DQL and does not lock the database.
>
> It will absolutely remain harmless with my proposal, if you don't change
your code.
>
> However, for that use case I would like to encourage the use of
autocommit mode. That's really the semantics you want here.

I should NOT need to mess with anything related to "commit" if I am just
selecting.  If that means another new function for
lockless/read-only/uncommitted-read connections, then so be it.

> My take is to avoid the problem entirely, and not inflict it to new
users, by providing an option to start in autocommit mode and then create
transactions only when you want them.

But again, if it requires choosing a commit mode for my selects,  then it
fails to be simple.
History
Date User Action Args
2014-06-15 01:29:59Jim.Jewettsetrecipients: + Jim.Jewett, ghaering, pitrou, Jeremy Banks, r.david.murray, zzzeek, asvetlov, flox, adamtj, dholth, torsten, monsanto, scott.urban, aymeric.augustin, tshepang, Ronny.Pfannschmidt, Mark.Bucciarelli, bulb
2014-06-15 01:29:59Jim.Jewettlinkissue10740 messages
2014-06-15 01:29:58Jim.Jewettcreate