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 — gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False by geryogam · Pull Request #99825 · python/cpython

Conversation

@geryogam

@geryogam geryogam commented Nov 27, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Document sqlite3.connect() as implicitly opening transactions in the new PEP-249 manual commit mode #99824

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@geryogam
Document sqlite3.connect() as implicitly opening transactions in the …
86b8244
…new PEP-249 manual commit mode
@bedevere-bot bedevere-bot mentioned this pull request Nov 27, 2022
Document sqlite3.connect() as implicitly opening transactions in the new PEP-249 manual commit mode #99824
Closed
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Nov 27, 2022
erlend-aasland
erlend-aasland requested changes Nov 27, 2022
View reviewed changes
Comment thread Doc/library/sqlite3.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting review label Nov 27, 2022
@bedevere-bot

bedevere-bot commented Nov 27, 2022

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label Nov 27, 2022
@jorisvandenbossche jorisvandenbossche mentioned this pull request Nov 28, 2022
ARROW-18380: [Dev] Update dev_pr GitHub workflows to accept both GitHub issues and JIRA apache/arrow#14731
Merged
geryogam added 2 commits November 28, 2022 18:01
@geryogam
Document sqlite3.connect() as implicitly opening transactions in the …
c3963f4
…new PEP-249 manual commit mode
@geryogam
Revert "Document sqlite3.connect() as implicitly opening transactions…
9cbd2c6
… in the new PEP-249 manual commit mode"

This reverts commit 86b8244.
@geryogam

geryogam commented Nov 28, 2022

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Nov 28, 2022
@bedevere-bot

bedevere-bot commented Nov 28, 2022

Copy link
Copy Markdown

Thanks for making the requested changes!

@erlend-aasland: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from erlend-aasland November 28, 2022 17:02
@geryogam
geryogam marked this pull request as ready for review November 28, 2022 18:23
@geryogam
geryogam requested a review from berkerpeksag as a code owner November 28, 2022 18:23
erlend-aasland
erlend-aasland reviewed Nov 28, 2022
View reviewed changes
Comment thread Doc/library/sqlite3.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@geryogam
Apply Erlend’s change suggestion
a9273c6
CAM-Gerlach
CAM-Gerlach reviewed Nov 29, 2022
View reviewed changes

@CAM-Gerlach CAM-Gerlach left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, after taking some time to carefully consider both the current discussion on the issue and practical implementation here, my current view from a non-expert reader perspective is that it should in fact be mentioned in the autocommit-mode transaction control explanation with the other behavior details, and possibly elided from the autocommit parameter to connect, based on the following rationale:

  • It would be quite concise to mention it there (only adding a few words), whereas it would be a whole sentence in what should be a much more austere reference, particularly one that is otherwise heavily abridged with almost all the details explained elsewhere
  • Likewise, to me it feels like a better fit with the existing text/phrasing there, requiring only adding one more item in a prose list of places transactions are implicitly opened, as opposed to adding a sentence that seems somewhat out of place with the rest of the paragraph's content
  • It seems to be of more use to readers as a part of a holistic explanation of the module's PEP 249-compliant mode of transaction behavior, as opposed to an isolated mention which seems less useful or potentially even confusing away from the explanation of the rest of the behavior.
  • It also highlights a particular contrast when versus the legacy behavior that explanation implicitly contrasts it with, which it doesn't really do here on its own

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

geryogam reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Doc/library/sqlite3.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach
CAM-Gerlach requested a review from erlend-aasland November 29, 2022 05:42
geryogam and others added 3 commits November 29, 2022 10:04
@geryogam @CAM-Gerlach
Move and extend the implicit transaction opening sentence for connect()
452c52a
Co-authored-by: C.A.M. Gerlach <[email protected]>
@geryogam
Add a similar descriptive sentence for the isolation_level parameter
d866e90
@geryogam
Apply CAM’s suggested change
0d15229
erlend-aasland
erlend-aasland approved these changes Nov 30, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels Nov 30, 2022
@erlend-aasland
Merge branch 'main' into sqlite3/implicit-transactions
7fd8cb7
@erlend-aasland erlend-aasland changed the title gh-99824: Document sqlite3.connect() as implicitly opening transactions in the new PEP-249 manual commit mode gh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False Nov 30, 2022
@erlend-aasland
erlend-aasland merged commit 19c3880 into python:main Nov 30, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Nov 30, 2022
@geryogam

geryogam commented Nov 30, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@geryogam
geryogam deleted the sqlite3/implicit-transactions branch November 30, 2022 11:59
@CAM-Gerlach

CAM-Gerlach commented Nov 30, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Thanks, all.

While no longer directly related to the topic of this PR, IMO it's still worth adding the one-line summaries to the two parameter descriptions, as the primary rationale for them is independent of the added sentence (and for the same reasons we agreed on doing the same for row_factory in #99507 , despite it also having a detailed how-to):

While we want to keep the parameter descriptions as concise as practical, they're missing a brief one-line summary of this parameter's purpose (to control legacy/PEP 249 transaction handling behavior) to give the reader at least a basic idea of what it is actually for, and whether it might be prudent to read more about it in the linked references.

@erlend-aasland if you agree, I can open a new PR to add those.

erlend-aasland and geryogam reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented Nov 30, 2022

Copy link
Copy Markdown
Contributor

@erlend-aasland if you agree, I can open a new PR to add those.

Please do.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach CAM-Gerlach mentioned this pull request Dec 1, 2022
Doc: Add summary line to isolation_level & autocommit sqlite3.connect params #99917
Merged
@CAM-Gerlach

CAM-Gerlach commented Dec 1, 2022

Copy link
Copy Markdown
Member

Thanks, opened as PR #99917

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm added a commit to carljm/cpython that referenced this pull request Dec 1, 2022
@carljm
Merge branch 'main' into fixinspect
12f7659
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@CAM-Gerlach CAM-Gerlach CAM-Gerlach left review comments
@erlend-aasland erlend-aasland erlend-aasland approved these changes
@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@geryogam @bedevere-bot @CAM-Gerlach @erlend-aasland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.