Title: Align sqlite3 transaction handling for autocommit=False with CPython · Issue #8258 · RustPython/RustPython · GitHub
Open Graph Title: Align sqlite3 transaction handling for autocommit=False with CPython · Issue #8258 · RustPython/RustPython
X Title: Align sqlite3 transaction handling for autocommit=False with CPython · Issue #8258 · RustPython/RustPython
Description: Feature RustPython exposes the three Connection.autocommit modes, but autocommit=False does not follow CPython's transaction lifecycle. A connection does not enter a transaction immediately, and commit() and rollback() do not open a new ...
Open Graph Description: Feature RustPython exposes the three Connection.autocommit modes, but autocommit=False does not follow CPython's transaction lifecycle. A connection does not enter a transaction immediately, and co...
X Description: Feature RustPython exposes the three Connection.autocommit modes, but autocommit=False does not follow CPython's transaction lifecycle. A connection does not enter a transaction immediately, an...
Opengraph URL: https://github.com/RustPython/RustPython/issues/8258
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Align sqlite3 transaction handling for autocommit=False with CPython","articleBody":"## Feature\n\n\u003c!-- What Python feature is missing from RustPython? Give a short description of the feature and how you ran into its absence. --\u003e\n\nRustPython exposes the three `Connection.autocommit` modes, but `autocommit=False` does not follow CPython's transaction lifecycle. A connection does not enter a transaction immediately, and `commit()` and `rollback()` do not open a new transaction afterward. Closing a connection and running `executescript()` also do not consistently preserve the selected mode.\n\nCPython keeps a transaction open for `autocommit=False`, reopens one after `commit()` or `rollback()`, rolls back a pending transaction on close, and preserves the behavior of the `True`, `False`, and legacy modes in context managers, DML execution, and `executescript()`.\n\nThis leaves six tests in `Lib/test/test_sqlite3/test_transactions.py` marked as expected failures. Invalid autocommit value validation is outside this scope.\n\n## Python Documentation or reference to CPython source code\n\n\u003c!-- Give a link to the feature in the CPython documentation (https://docs.python.org/3/) in order to assist in its implementation. --\u003e\n\n- [Python 3.14 sqlite3 transaction control](https://docs.python.org/3.14/library/sqlite3.html#transaction-control-via-the-autocommit-attribute)\n- [CPython test_transactions.py](https://github.com/python/cpython/blob/v3.14.5/Lib/test/test_sqlite3/test_transactions.py)","author":{"url":"https://github.com/teddygood","@type":"Person","name":"teddygood"},"datePublished":"2026-07-11T22:00:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/8258/RustPython/issues/8258"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6031b4c1-565b-6753-3d88-5df5ee50d9a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D288:70AED:93AF64:C5050E:6A62A061 |
| html-safe-nonce | f8f0b8751cf5691ff864b7d8ef5c60ee42b066415537a3c270028be8633b25b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjg4OjcwQUVEOjkzQUY2NDpDNTA1MEU6NkE2MkEwNjEiLCJ2aXNpdG9yX2lkIjoiMjQzMTA3Nzg2MjE0MzU5ODY4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8d89b47298b9d86defe8c97496a72ed7590f383755ac24bda8736c893b66eaba |
| hovercard-subject-tag | issue:4864329179 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/8258/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fff3afcc51b56b09ed0a188dedfbc451b3a542f492f64f800ad1c5c482a892b7/RustPython/RustPython/issues/8258 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fff3afcc51b56b09ed0a188dedfbc451b3a542f492f64f800ad1c5c482a892b7/RustPython/RustPython/issues/8258 |
| og:image:alt | Feature RustPython exposes the three Connection.autocommit modes, but autocommit=False does not follow CPython's transaction lifecycle. A connection does not enter a transaction immediately, and co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | teddygood |
| hostname | github.com |
| expected-hostname | github.com |
| None | a6443033349a18134b517627f043d4a59a5110337b879810c7229c2c7e28eda0 |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d6c6cacbe32d3ddfd1796fbd1a39b8fb47b87daf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width