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 — Clarify sqlite3 documentation of PEP 249 compliance for commit modes · Issue #99828 · python/cpython

Clarify sqlite3 documentation of PEP 249 compliance for commit modes #99828

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Clarify sqlite3 documentation of PEP 249 compliance for commit modes#99828
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-sqlite3

Description

@geryogam
geryogam
opened on Nov 27, 2022
Issue body actions

Documentation

The sqlite3 documentation for the new Connection.autocommit attribute introduced in PR #93823 states:

   .. attribute:: autocommit

      This attribute controls :pep:`249`-compliant transaction behaviour.
      :attr:`!autocommit` has three allowed values:

      * ``False``: Select :pep:`249`-compliant transaction behaviour,
        implying that :mod:`!sqlite3` ensures a transaction is always open.

        This is the recommended value of :attr:`!autocommit`.

      * ``True``: Use SQLite's `autocommit mode`_.
        :meth:`commit` and :meth:`rollback` have no effect in this mode.

      * :data:`LEGACY_TRANSACTION_CONTROL`:
        Pre-Python 3.12 (non-:pep:`249`-compliant) transaction control.
        See :attr:`isolation_level` for more details.

The sentence ‘This attribute controls :pep:249-compliant transaction behaviour.’ is misleading as only the new manual commit mode (autocommit=False) is PEP-249-compliant, since PEP 249 specifies only the manual commit mode.

Likewise, the sentence ‘Pre-Python 3.12 (non-:pep:249-compliant) transaction control.’ is misleading as only the legacy manual commit mode (isolation_level='DEFERRED', isolation_level='EXCLUSIVE', or isolation_level='IMMEDIATE') is non-PEP-249-compliant, since PEP 249 specifies only the manual commit mode.

Linked PRs

  • gh-99828: Clarify sqlite3 documentation of PEP 249 compliance for commit modes #99829

Activity

  1. geryogam
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Nov 27, 2022
  2. erlend-aasland
    added
    topic-sqlite3
    on Nov 27, 2022
  3. erlend-aasland commented on Nov 28, 2022

    @erlend-aasland
    erlend-aasland
    on Nov 28, 2022
    Contributor
    More actions

    The sentence ‘This attribute controls :pep:249-compliant transaction behaviour.’ is misleading as only the new manual commit mode (autocommit=False) is PEP-249-compliant, since PEP 249 specifies only the manual commit mode.

    It is not misleading. PEP-249 says that autocommit is True implies leaving the "autocommitting" to SQLite. That is what we do, and there is nothing "non-PEP-249-compliant" about that.

    Likewise, the sentence ‘Pre-Python 3.12 (non-:pep:249-compliant) transaction control.’ is misleading as only the legacy manual commit mode (isolation_level='DEFERRED', isolation_level='EXCLUSIVE', or isolation_level='IMMEDIATE') is non-PEP-249-compliant, since PEP 249 specifies only the manual commit mode.

    Ditto. IMO, this is perfectly fine.

    AFAICS, there is no need to change those wordings; suggesting to close this issue.

    Thanks for your interest in improving the docs!

  4. erlend-aasland
    added
    pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
    on Nov 28, 2022
  5. geryogam commented on Nov 28, 2022

    @geryogam
    geryogam
    on Nov 28, 2022
    ContributorAuthor
    More actions

    Fair enough. Thanks for the discussion.

    Reacted by Erlend E. Aasland
  6. geryogam
    closed this as completedon Nov 28, 2022
  7. erlend-aasland
    closed this as not plannedon Nov 28, 2022
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 dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-sqlite3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — 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.