-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Improve sqlite3 documentation of the new autocommit attribute #99670
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
Comments
See comment on the PR |
Answering #99435 (comment):
The first commit is a code style issue in the tests; it does not add new information; it does not alter the semantics of the tests or code in question. I agree it is a bit of a code smell, but it is not worth fixing just because it's code smell. If (or when) we touch similar parts of the code, for example because we are adding new tests, or because we are adjusting incorrect tests, we can sneak in such a style change. (Also, this change has nothing to do with the issue title.) These sentences are part of the reference for cursor methods. The reference for cursor methods describe what happens when you invoke these methods. I'm not sure explicitly stating that for every method is worth it, and I believe it clutters the docs. I'm not sure this change is needed either. The docs say a transaction is always open; this implies a connection is open when the connection is created. Otherwise that sentence would have been incorrect. Also, the current wording starts off simply by stating what behaviour the user can expect: A transaction is always open. Then it goes on adding details about the two most important methods, commit and rollback. The rewording in d864934 starts off by explaining the details and ends with explaining the behaviour. I'm not sure that is a good rephrasing. Also, the commit title does not reflect the actual change: it does not add connect to a list of transaction-opening methods; it does a complete rewording of a paragraph in addition to mentioning
IMO, this is not at all clarifying. PEP-249 does not describe an autocommit (non-transactional) mode. All it says is: some databases has some kind of concept of autocommit. If your underlying database supports such functionality, you can enable it when
Unfortunately, that does not help; discussing and reviewing 9 separate issues in a single PR/issue is not productive. It is difficult to discuss (cross-conversations), and it is impossible to review, hence my closing the PR and the issue. If you find issues, create instead targeted and narrow issues, so we can discuss each change isolated. Now for the rest of the commits: Which inconsistency is this? I cannot deduce this inconsistency from the commit title "improve wording consistency". Looking at the commit diff, it makes many inconsistent changes; some stylish are rewordings and some are incorrect plural/singular adjustments. I don't see any explanation or comment regarding what's wrong with the current wording. Ditto Such a change might be worth considering, however see Guido's recent response to a similar concern. IMO, this change is stylish churn. I do appreciate you being interested in improving the docs, but please try to identify and explain the problems with the current docs, preferrably one by one, instead of proposing multiple unrelated changes like this. |
Thanks for taking the time to consider each suggested changes.
Yes this one was unrelated to this PR, but I was not sure it was worth opening a separate PR for such a trivial change.
I find the current wording a bit confusing, but that is just my interpretation.
Implicit-transaction-opening methods
My bad, it is indeed a rewording and I should have put it in the ‘Improve wording consistency’ commit.
So what you call ‘PEP-249 compliant’ is the manual commit mode specified in the PEP (implicit-transaction opening methods Then I think that the sentence ‘This attribute controls :pep: Likewise for the sentence ‘Pre-Python 3.12 (non-:pep: |
I'll try to explain this again, hopefully less ambiguous this time:
I understand that you find this confusing, hence your wish to change it. But I cannot know what you find confusing unless you tell me. That is why I've asked you to describe the problems you are seeing; unless you do so, all I can do is to guess. If you describe the issues you are seeing, it will be easier for us to be on the same page, and it is easier to have a fruitful conversation about how to improve things. Also, as I already warned about, using a single GitHub issue to manage multiple unrelated issues is counter-productive; each post constains multiple unrelated paragraphs. Responding to each others posts quickly becomes very time-consuming, and it is difficult to follow the conversation history. This is why I've recommended to create narrow and targeted issues where you describe each problem on its own, and I now strongly recommend this again, but I suggest you take a look at the devguide first: Let me quote from the devguide link:
Related: I see that the "Making Good PRs" section in the devguide unfortunately does not (yet) mention that a PR should be focused and narrowed down to a single change; it should not try to fix many things at once, as that makes it hard to review. |
Documentation
After reviewing the design and implementation of
sqlite3
’s newautocommit
attribute of PR #93823, here is the follow-up review of the documentation, addressing 9 issues with PR #99435:The text was updated successfully, but these errors were encountered: