[Buildbot-commits] [SPAM] [Buildbot] #882: pysqlite + cygwin = no UPDATE

Buildbot buildbot-devel at lists.sourceforge.net
Sun Jun 6 23:22:20 UTC 2010


#882: pysqlite + cygwin = no UPDATE
------------------------+---------------------------------------------------
Reporter:  dustin       |       Owner:         
    Type:  enhancement  |      Status:  new    
Priority:  major        |   Milestone:  0.8.+  
 Version:  0.8.0        |    Keywords:  windows
------------------------+---------------------------------------------------
 {{{
 Traceback (most recent call last):
   File "/home/user/slave/slave-xp-
 cygwin-1.7/build/buildbot/test/regressions/test_import_unicode_changes.py",
 line 71, in testAsciiChange
     sm.upgrade(quiet=True)
   File "/home/user/slave/slave-xp-
 cygwin-1.7/build/buildbot/db/schema/manager.py", line 56, in upgrade
     upg.upgrade()
   File "/home/user/slave/slave-xp-
 cygwin-1.7/build/buildbot/db/schema/v2.py", line 9, in upgrade
     self.set_version()
   File "/home/user/slave/slave-xp-
 cygwin-1.7/build/buildbot/db/schema/v2.py", line 32, in set_version
     c.execute("""UPDATE version set version = 2 where version = 1""")
 pysqlite2.dbapi2.OperationalError: unable to open database file
 }}}

 I managed the pare this failure back to here:

 {{{
 import os
 import sqlite3 as dbapi

 if os.path.exists("test4.sqlite"):
   os.unlink("test4.sqlite")
 conn = dbapi.connect("test4.sqlite")
 c = conn.cursor()
 c.execute("CREATE TABLE version (version integer not null)")
 c.execute("update version set version=13")
 }}}

 That last line will generate teh same error.  If I change "version" in the
 query, it will give an expected error (no such table or no such column,
 depending on which one I change), so clearly it is opening the file
 without any trouble.  Also, if I change the UPDATE (which doesn't actually
 change anything in the db in this case) to an INSERT (which does):
 {{{
 c.execute("insert into version values (13)")
 }}}
 then it will complete without error.

 This has to do with file handling - using ":memory:" works fine.

 This was the straw that broke the camel's back for #880 - we should have a
 slave implementation that runs fine and doesn't fail its tests, even on
 cygwin.

-- 
Ticket URL: <http://buildbot.net/trac/ticket/882>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list