[issue16958] The sqlite3 context manager does not work with isolation_level=None

2014-06-06 Thread aaugustin
aaugustin added the comment: * Thesis * I belive that using the connection as a context manager is an inadequate API for controlling transactions because it's very likely to result in subtly broken code. As a consequence, my recommendation would be to deprecate this API. * Argumentation

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-06-04 Thread aaugustin
aaugustin added the comment: On the other hand there is absolutely nothing broken on the implicit BEGIN (which is required by dbapi2 specification) nor on the isolation_level property which controls it. Those shouldn't be touched; there is no reason to. Nothing broken... unless one

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-04-17 Thread aaugustin
aaugustin added the comment: Hey -- maintainer of Django's transaction support here. This ticket was brought to my attention again today. As I know a few things about this issue and I see Python core devs asking for input, I'll give my $0.02. The core of this issue is that, **by default

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-04-17 Thread aaugustin
aaugustin added the comment: That patch solves the problem, at the cost of introducing an unwieldy API, operation_needs_transaction_callback. I'm very skeptical of the other API, in_transaction. Other database backends usually provide an autocommit attribute. autocommit is the opposite

[issue11553] Docs for: import, packages, site.py, .pth files

2011-07-23 Thread aaugustin
aaugustin aymeric.augus...@polyconseil.fr added the comment: I noticed an inconsistency in the docs, and I think it falls in the Language Reference section of this ticket. In the definition of the import statement, after: | from module import * we should add: | from

[issue11140] Error in the documentation of threading.Lock().release()

2011-02-07 Thread aaugustin
New submission from aaugustin aymeric.augus...@polyconseil.fr: The docs for the threading module state that: The release() method should only be called in the locked state; it changes the state to unlocked and returns immediately. If an attempt is made to release an unlocked lock

[issue11140] threading.Lock().release() raises _thread.error, not RuntimeError

2011-02-07 Thread aaugustin
aaugustin aymeric.augus...@polyconseil.fr added the comment: I agree with your solution. Unfortunately, I do not know how you would redefine ThreadError to extend RuntimeError in a C extension. _thread.error is created line 741 in trunk/Modules/threadmodule.c: ThreadError = PyErr_NewException