-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document sqlite3.connect() as implicitly opening transactions in the new PEP-249 manual commit mode #99824
Comments
Thanks for creating an issue and explaining your reasoning behind this proposed change.
For your information; the PEP 249 is the specification, and Marc-André has recently updated it with information about the |
The docs you point to are the docs explaining transaction control using the Footnotes |
Yes we should probably document the implicit transaction opening behaviour of the
But we should also probably document it in Explanation > Transaction control since it is a general section about transaction control. And as you said, when the autocommit parameter is |
I'm -1 for that change; I'm afraid you are overcomplicating things. We should keep the docs (both reference and explanation, but especially the former) to the point; we should resist the urge to be overly verbose. IMO, the right thing to do, is to update the
No, they are the same; the
I'm -1 for such a change; the initial value of both attributes can be set using a keyword parameter when the connection object is set up. This is all explained in the reference; please take a look at the existing docs. There is no need to be overly verbose. |
Done. |
… if autocommit=False (#99825) Authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* main: (112 commits) pythongh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking (python#99895) pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (pythonGH-99613) Doc: Add summary line to isolation_level & autocommit sqlite3.connect params (python#99917) pythonGH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (pythonGH-98916) pythongh-89189: More compact range iterator (pythonGH-27986) bpo-47220: Document the optional callback parameter of weakref.WeakMethod (pythonGH-25491) pythonGH-99905: Fix output of misses in summarize_stats.py execution counts (pythonGH-99906) pythongh-99845: PEP 670: Convert PyObject macros to functions (python#99850) pythongh-99845: Use size_t type in __sizeof__() methods (python#99846) pythonGH-99877) Fix typo in exception message in `multiprocessing.pool` (python#99900) pythongh-87092: move all localsplus preparation into separate function called from assembler stage (pythonGH-99869) pythongh-99891: Fix infinite recursion in the tokenizer when showing warnings (pythonGH-99893) pythongh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (python#99825) pythonGH-81057: remove static state from suggestions.c (python#99411) Improve zip64 limit error message (python#95892) pythongh-98253: Break potential reference cycles in external code worsened by typing.py lru_cache (python#98591) pythongh-99127: Allow some features of syslog to the main interpreter only (pythongh-99128) pythongh-82836: fix private network check (python#97733) Docs: improve accuracy of socketserver reference (python#24767) ...
Documentation
In
sqlite3
, @malemburg specified thatconnect()
,commit()
, androllback()
implicitly open transactions in the new PEP-249 manual commit mode implemented in PR #93823:So I expect to see that information clearly documented.
Yet the PR documented it only for
commit()
androllback()
(item b), not forconnect()
(item a):To me it is important to document it also for
connect()
rather than relying on user’s deduction, which is not obvious at all since for instance in legacy manual commit mode,sqlite3
does not implicitly open transactions whenconnect()
is called but whenexecute()
is called on a DML statement.Linked PRs
The text was updated successfully, but these errors were encountered: