[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-10-17 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is now fixed in r85660. The field associated with a T_BOOL must be of type char, so I changed the type of inTransaction. -- resolution: - fixed status: open - closed ___ Python tracker

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-10-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thank you, Martin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___ ___

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-10-16 Thread Bill Janssen
Bill Janssen bill.jans...@gmail.com added the comment: PPC Tiger is using Python 2.7, so it's 3.6.11. Python 3.X also seems to be failing the sqlite tests on PPC Leopard. Is the required version # different between 3.1 and 3.x? -- ___ Python

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-10-16 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The attribute and test aren't in 3.1 (or 2.7), so this issue only applies to 3.x trunk. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-10-16 Thread Ned Deily
Ned Deily n...@acm.org added the comment: FYI, in a recent py3k installer build test using the same installer image (2-way i386/ppc universal with statically linked sqlite 3.6.11), the test fails on ppc G3 (10.4), ppc g4 (10.5) but passes on i386 (10.6) so I'd go along with Bill's big- vs

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-09-28 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Added version print to test_sqlite in r85807. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-09-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Antoine also suggested it might be the particular version of sqlite in use on the buildbot, but I don't currently know what version that is. Bill, can you clue me in? You could simply print out sqlite3.sqlite_version at the beginning of

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-08-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The sparc ubuntu buildbot appears to no longer exist. The sparc solaris buildbot doesn't have a problem with it. So right now only PPC Tiger is failing. An endianness issue was suggested, but since T_BOOL is used by _io, and that is

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-08-15 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- components: +Macintosh keywords: +buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-08-15 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___ ___ Python-bugs-list

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-06-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Reopen the issue: the test fails on Sparc. http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%203.x/builds/222 == FAIL: CheckInTransaction

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-06-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Same error on builder PPC Leopard 3.x. http://www.python.org/dev/buildbot/builders/PPC%20Leopard%203.x/builds/87/steps/test/logs/stdio test_sqlite test test_sqlite failed -- Traceback (most recent call last): File

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed in r81632. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-30 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is a complete patch, including documentation. I tweaked Shashwat's unit test a bit, and added one to make sure the attribute is read only. I'll apply this soonish if there are no objections. -- assignee: - r.david.murray

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-30 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: Removed file: http://bugs.python.org/file17499/sqlite3_in_transaction.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-30 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: Added file: http://bugs.python.org/file17500/sqlite3_in_transaction.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: I have a use case where I'd like to be able to check whether or not there is an uncommitted transaction. The use case is a REPL database editor. If the user issues the 'save' command a commit is done. When they quit the application,

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Shashwat Anand
Changes by Shashwat Anand anand.shash...@gmail.com: -- nosy: +l0nwlf ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___ ___ Python-bugs-list

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Shashwat Anand
Shashwat Anand anand.shash...@gmail.com added the comment: Tested this patch, works perfectly fine. Also it suits for the particular use case which David mentioned where there is no better alternate approach. -- Added file: http://bugs.python.org/file17484/dbapi.patch

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com added the comment: If the user issues the 'save' command a commit is done. When they quit the application, I'd like to be able to prompt them with a 'save or discard' if and only if they have made changes since the last save. Isn't this the

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Shashwat Anand
Changes by Shashwat Anand anand.shash...@gmail.com: Removed file: http://bugs.python.org/file17484/dbapi.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Shashwat Anand
Shashwat Anand anand.shash...@gmail.com added the comment: conn = sqlite3.connect('dbdump.sqlite') c = conn.cursor() conn.in_transaction False c.execute('CREATE TABLE foo (id integer, name text)') sqlite3.Cursor object at 0x1004a7730 conn.in_transaction False It gives True for Insert and

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: @exarkun: yes, but since the module is already tracking that information, it seems silly to duplicate it in my code, especially since that duplication could include data-losing bugs. @l0nwlf: its behaviour is in accord with the module

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Shashwat Anand
Changes by Shashwat Anand anand.shash...@gmail.com: Removed file: http://bugs.python.org/file17485/dbapi.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Shashwat Anand
Shashwat Anand anand.shash...@gmail.com added the comment: Ok then. Uploading unit-test which takes value of in_transaction as False after issuing a Create statement. It passes with the patch applied. -- Added file: http://bugs.python.org/file17486/dbapi.patch

[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-05-28 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: The patch lacks documentation. Otherwise, I think it's fine. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8845 ___