<div dir="ltr">Hi Craig,<div><br></div><div>Even with one thread there is still the main thread and the db thread.</div><div>I have spent already a bunch of time trying to fix this warning (on py2).</div><div>Looking at the source of sqlalchemy it looked actually harmless.</div><div>Now it is a plain error, It looks like we will need to look again and fix it.</div><div>I see that nocolor did a try at it but it didn't work</div><div><br></div><div>Pierre</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le lun. 13 févr. 2017 à 05:37, Craig Rodrigues <<a href="mailto:rodrigc@crodrigues.org">rodrigc@crodrigues.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi,<br class="gmail_msg"><br class="gmail_msg">I followed these steps to set up a Python 3.6 build environment:<br class="gmail_msg"><br class="gmail_msg"><a href="https://lists.buildbot.net/pipermail/devel/2017-February/012310.html" class="gmail_msg" target="_blank">https://lists.buildbot.net/pipermail/devel/2017-February/012310.html</a><br class="gmail_msg"><br class="gmail_msg">If run this test:<br class="gmail_msg"><br class="gmail_msg">trial buildbot.test.unit.test_db_pool<br class="gmail_msg"><br class="gmail_msg">I get this error:<br class="gmail_msg"><br class="gmail_msg">Exception closing connection <sqlite3.Connection object at 0x1052bfb90><br class="gmail_msg">Traceback (most recent call last):<br class="gmail_msg"> File "/Users/crodrigues/.pyenv/versions/venv-3.5.2/lib/python3.5/site-packages/sqlalchemy/pool.py", line 300, in _close_connection self._dialect.do_close(connection)<br class="gmail_msg"> File "/Users/crodrigues/.pyenv/versions/venv-3.5.2/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 446, in do_close<br class="gmail_msg"> dbapi_connection.close()<br class="gmail_msg">sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 123145392500736 and this is thread id 140736404648896<br class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I looked into the code and saw that this line in enginestrategy.py:</div><div class="gmail_msg"><a href="https://github.com/buildbot/buildbot/blob/master/master/buildbot/db/enginestrategy.py#L171" class="gmail_msg" target="_blank">https://github.com/buildbot/buildbot/blob/master/master/buildbot/db/enginestrategy.py#L171</a><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">restricts max_conns to 1 if the database is SQLite. This *should* restrict things</div><div class="gmail_msg">to only one thread in the dbpool.</div><div class="gmail_msg">I can't figure out what's going on here.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I would greatly appreciate if someone could help with this!</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">--<br class="gmail_msg"></div><div class="gmail_msg">Craig</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
devel mailing list<br class="gmail_msg">
<a href="mailto:devel@buildbot.net" class="gmail_msg" target="_blank">devel@buildbot.net</a><br class="gmail_msg">
<a href="https://lists.buildbot.net/mailman/listinfo/devel" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.buildbot.net/mailman/listinfo/devel</a></blockquote></div>