Title: Improve clarity of sqlite3 transaction handling docs · Issue #94017 · python/cpython · GitHub
Open Graph Title: Improve clarity of sqlite3 transaction handling docs · Issue #94017 · python/cpython
X Title: Improve clarity of sqlite3 transaction handling docs · Issue #94017 · python/cpython
Description: Documentation The sqlite3 module docs has a section called Controlling Transactions. There are some improvement possibilities: The current docs start out by describing the SQLite autocommit mode. This can be confusing to new users, espec...
Open Graph Description: Documentation The sqlite3 module docs has a section called Controlling Transactions. There are some improvement possibilities: The current docs start out by describing the SQLite autocommit mode. T...
X Description: Documentation The sqlite3 module docs has a section called Controlling Transactions. There are some improvement possibilities: The current docs start out by describing the SQLite autocommit mode. T...
Opengraph URL: https://github.com/python/cpython/issues/94017
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve clarity of sqlite3 transaction handling docs","articleBody":"**Documentation**\r\n\r\nThe sqlite3 module docs has a section called [Controlling Transactions](https://docs.python.org/3/library/sqlite3.html#controlling-transactions).\r\n\r\nThere are some improvement possibilities:\r\n\r\n- The current docs start out by describing the _SQLite_ autocommit mode. This _can_ be confusing to new users, especially since the DB API (PEP-249) describes its own autocommit behaviour. Suggesting to tone down the SQLite autocommit mode and instead focus on what the sqlite3 module does.\r\n- The docs say that implicit BEGIN statements are issues before DML statements. This is partly true. Implicit BEGIN statements are issued before INSERT, UPDATE, DELETE, and REPLACE statements _when_ executed by `execute` or `executemany`, but not by `executescript`. Other DML statements do not receive such treatment.\r\n- We should update the docs of the `execute`, `executemany`, and `executescript` cursor methods to briefly mention their transaction control peculiarities.\r\n- Since _SQLite autocommit mode_ is mentioned, we should note that it is in fact possible to query this (low-level) mode using the `in_transaction` connection attribute. Such information can help developers debug transaction control problems.\r\n- Possibly augment the docs of the `isolation_level` attribute. Currently, the `isolation_level` _property_ of `connection` refer to the docs of the `isolation_level` _attribute_, which again refer to the _Controlling Transactions_ section. The `isolation_level` property should have a concise description (reference), and link to the `isolation_level` attribute. The `isolation_level` attribute should provide a _reference_ for what it does, and briefly mention expected behaviour. The _Controlling Transactions_ section should provide more background (explanation) to what is happening, and it should briefly mention PEP 249, and the SQLite autocommit mode.\r\n- Revisit any transaction control examples and possibly turn them into clearer how-to's, or guides.","author":{"url":"https://github.com/erlend-aasland","@type":"Person","name":"erlend-aasland"},"datePublished":"2022-06-20T08:30:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/94017/cpython/issues/94017"}
| 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:0f6ebd3a-1a4d-ca81-937e-6aab81bed1eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5CE:3A35C6:2A96978:37D52B6:696B2DAB |
| html-safe-nonce | f97b9edb2a41f9702ef2e0c4f2e5fd04899e1da2385e599df08f9b7c8ca5a843 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUNFOjNBMzVDNjoyQTk2OTc4OjM3RDUyQjY6Njk2QjJEQUIiLCJ2aXNpdG9yX2lkIjoiNzgzMjQyNTIxNDczNjU4MjgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2aa175b455726460807b285d3dcba210e27b921bb421726b11decdb8f6776bb2 |
| hovercard-subject-tag | issue:1276562792 |
| 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/python/cpython/94017/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6a8222b08571b9256529746b1a52b742fe543c6cdb8107ad094fe446b62860d3/python/cpython/issues/94017 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6a8222b08571b9256529746b1a52b742fe543c6cdb8107ad094fe446b62860d3/python/cpython/issues/94017 |
| og:image:alt | Documentation The sqlite3 module docs has a section called Controlling Transactions. There are some improvement possibilities: The current docs start out by describing the SQLite autocommit mode. T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erlend-aasland |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width