You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey benmatwil, thanks for reporting this in detail.
You're right, this is a bug.
The __exit__ implementation today just calls close(), which always rolls back uncommitted changes when autocommit=False.
There's no commit path in the context manager at all, so clean exits and exception exits both end up rolling back.
The wiki and the docstrings all describe commit-on-success / rollback-on-exception. , and that's what the implementation should be doing.
We'll fix __exit__ to match.
On bulkcopy and connections: Yes, bulkcopy() opens a separate internal PyCoreConnection under the hood.
This is a known limitation of the design and has been discussed across & tracked in #492.
Activity
github-actions commentedon Nov 2, 2026
Hi benmatwil, thank you for opening this issue!
Our team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.
If you have additional information to share, please feel free to update the issue.
Thank you for your patience!