From a select you are right. I added it to have a full case scenario, so we can remove it. However, SQLAlchemy in its latest documentation says clearly: 

However, the flush process always uses its own transactional demarcator called a subtransaction, which is described more fully in the docstrings for Session. **What it means here is that even though the database transaction has been rolled back, the end user must still issue rollback() to fully reset the state of the Session**.


Emphasis is mine, so we have to rollback :-)