<div dir="ltr">Hi,<br><br>I followed these steps to set up a Python 3.6 build environment:<br><br><a href="https://lists.buildbot.net/pipermail/devel/2017-February/012310.html">https://lists.buildbot.net/pipermail/devel/2017-February/012310.html</a><br><br>If ran this test:<br><br>trial buildbot.test.unit.test_scripts_cleanupdb.TestCleanupDb.test_cleanup<br><br>and got this error:<br><div><br></div>Traceback (most recent call last):<br>  File "/Users/crodrigues/buildbot2/master/buildbot/db/pool.py", line 182, in __thd<br>    rv = callable(arg, *args, **kwargs)<br>  File "/Users/crodrigues/buildbot2/master/buildbot/scripts/cleanupdb.py", line 62, in thd<br>    r = engine.execute("vacuum;")<br>  File "/Users/crodrigues/venv-3.6-2/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 939, in execute<br>    return self._execute_text(object, multiparams, params)<br>  File "/Users/crodrigues/venv-3.6-2/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text<br>    statement, parameters<br>  File "/Users/crodrigues/venv-3.6-2/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context<br>    context)<br>  File "/Users/crodrigues/venv-3.6-2/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception<br>    exc_info<br><br>  File "/Users/crodrigues/venv-3.6-2/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause<br>    reraise(type(exception), exception, tb=exc_tb, cause=cause)<br>  File "/Users/crodrigues/venv-3.6-2/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context<br>    context)<br>  File "/Users/crodrigues/venv-3.6-2/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 469, in do_execute<br>    cursor.execute(statement, parameters)<br>sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) cannot VACUUM from within a transaction [SQL: 'vacuum;']<br><br>buildbot.test.unit.test_scripts_cleanupdb.TestCleanupDb.test_cleanup<br>-------------------------------------------------------------------------------<div><br></div><div><br></div><div>I did some analysis, and found that the source of the problem is due to this</div><div>change in Python 3: <a href="https://docs.python.org/3/whatsnew/3.6.html#changes-in-the-python-api">https://docs.python.org/3/whatsnew/3.6.html#changes-in-the-python-api</a>:</div><div><br>* sqlite3 no longer implicitly commits an open transaction before DDL statements.</div><div><br></div><div>I think the easiest way to fix this would be to enable auto-commit mode</div><div>for sqlite3, as was the previous default behavior in earlier versions of Python.</div><div><br></div><div>Can someone familiar with the Python sqlite API help me do this?</div><div><br></div><div>I don't know where in the buildbot code to do this.</div><div><br></div><div>Thanks!</div><div><br></div><div>--</div><div>Craig</div></div>