[issue27334] [sqlite3] context manager leaves db locked if commit fails in __exit__

Erlend E. Aasland report at bugs.python.org
Mon May 17 18:40:47 EDT 2021


Erlend E. Aasland <erlend.aasland at innova.no> added the comment:

> In fact the exception is in the `pass` line rather than in the `execute` line.

I can reproduce this without the `pass` line.

I've taken the liberty to create a PR based on your patch, Luca. Berker's comments have been addressed in the PR.

----------
title: pysqlite3 context manager not performing rollback when a database is locked elsewhere for non-DML statements -> [sqlite3] context manager leaves db locked if commit fails in __exit__
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27334>
_______________________________________


More information about the Python-bugs-list mailing list