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:f9334cf0-0128-8fa3-6adf-fee4dcb9df4a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B80:2125F7:16BC2AF:1EF42A5:6A62B5F1 |
| html-safe-nonce | a20c8ac7964efc05d23ed7e92958f9f1862c5dfb0ec0595a7e594510212a986b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjgwOjIxMjVGNzoxNkJDMkFGOjFFRjQyQTU6NkE2MkI1RjEiLCJ2aXNpdG9yX2lkIjoiMzcyNzY3NTYxNzc1ODU5MDQ0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8e35acab92a652c036eda2cc239de0b34154d5afa0a06e1240fb02f9375249c4 |
| 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 | 2738d7125e864b55224a8bc40c72c220ca7d2c73f91a7bb8d69dffe9d35e997d |
| 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 | bf54af498459157b66a67136f992a68752cdbb54 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width