I am in a Ubuntu 22.04 Docker container with Python 3.10. I use these apt packages: I use the following Python packages: The sessionmaker parameter autoflush is set to True. I want to add a deletion and after that an insertion to a sqlalchemy.orm session so that I commit only when the two commands worked out well. The aim of