-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed as not planned
Closed as not planned
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
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
Metadata
Metadata
Assignees
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