GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve clarity of sqlite3 transaction handling docs · Issue #94017 · python/cpython

Improve clarity of sqlite3 transaction handling docs #94017

New issue
Copy link
New issue
Copy link
Closed
#94320
Closed
Improve clarity of sqlite3 transaction handling docs#94017
#94320
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-sqlite3

Description

@erlend-aasland
erlend-aasland
opened on Jun 20, 2022
Issue body actions

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, 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.
  • 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.
  • We should update the docs of the execute, executemany, and executescript cursor methods to briefly mention their transaction control peculiarities.
  • 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.
  • 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.
  • Revisit any transaction control examples and possibly turn them into clearer how-to's, or guides.

Activity

  1. erlend-aasland
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    topic-sqlite3
    on Jun 20, 2022
  2. erlend-aasland
    added this to sqlite3 issueson Jun 20, 2022
  3. erlend-aasland
    moved this to TODO: Docs in sqlite3 issueson Jun 20, 2022
  4. erlend-aasland
    added a commit that references this issue on Jun 27, 2022

    pythongh-94017: Improve clarity of sqlite3 transaction handling docs

    91460c0
  5. erlend-aasland
    moved this from TODO: Docs to In Progress in sqlite3 issueson Jun 27, 2022
  6. CAM-Gerlach commented on Jun 29, 2022

    @CAM-Gerlach
    CAM-Gerlach
    on Jun 29, 2022
    Member
    More actions

    the isolation_level property of connection

    Just to note, this confused me greatly at first, since I thought it was referring to an isolation_level property (@property) of the Connection class, but what it appears to mean is the isolation_level parameter of the connection function.

  7. erlend-aasland commented on Jul 1, 2022

    @erlend-aasland
    erlend-aasland
    on Jul 1, 2022
    ContributorAuthor
    More actions

    Just to note, this confused me greatly at first, since I thought it was referring to an isolation_level property (@Property) of the Connection class, but what it appears to mean is the isolation_level parameter of the connection function.

    Sorry 'bout that! I was in a hurry :)

    Reacted by C.A.M. Gerlach
  8. erlend-aasland
    closed this as completedin #94320on Jul 6, 2022
  9. Repository owner moved this from In Progress to Done in sqlite3 issueson Jul 6, 2022
  10. erlend-aasland
    added a commit that references this issue on Jul 6, 2022

    gh-94017: Improve clarity of sqlite3 transaction handling docs (#94320)

    760b8cf
  11. miss-islington
    added 2 commits that reference this issue on Jul 6, 2022

    pythongh-94017: Improve clarity of sqlite3 transaction handling docs (p…

    dc3ff9d

    pythongh-94017: Improve clarity of sqlite3 transaction handling docs (p…

    667f4b8
  12. erlend-aasland commented on Jul 6, 2022

    @erlend-aasland
    erlend-aasland
    on Jul 6, 2022
    ContributorAuthor
    More actions

    Fixed in:

    • main: gh-94017: Improve clarity of sqlite3 transaction handling docs #94320
    • 3.11: [3.11] gh-94017: Improve clarity of sqlite3 transaction handling docs (GH-94320) #94617
    • 3.10: [3.10] gh-94017: Improve clarity of sqlite3 transaction handling docs (GH-94320) #94618
  13. miss-islington
    added 2 commits that reference this issue on Jul 6, 2022

    gh-94017: Improve clarity of sqlite3 transaction handling docs (GH-94320

    7e3b6af

    gh-94017: Improve clarity of sqlite3 transaction handling docs (GH-94320

    37a47b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-sqlite3

    Projects

    • sqlite3 issues
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.