Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101117: Improve accuracy of sqlite3.Cursor.rowcount docs#104287

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedMay 8, 2023
edited by github-actionsbot
Loading

The SQLite C API sqlite3_changes() can only be relied upon when the
statment has been run to completion.


📚 Documentation preview 📚:https://cpython-previews--104287.org.readthedocs.build/

The SQLite C API sqlite3_changes() can only be relied upon when thestatment has been run to completion.
@erlend-aasland
Copy link
ContributorAuthor

@rt121212121, would this docs update be an improvement?

@rt121212121
Copy link

As a developer in the Python ecosystem I have had more breaking changes than I would like in both standard library modules and core tools like the packaging tools, this is the third recently. Each of these is regrettable and incurs both unwanted work and confusion.

Documentation would be good. I would recommend that all breaking changes are clearly and explicitly documented, both in what's new and in the library documentation. I understand that you have a lot of demands on your time, so that would be appreciated.

Personally, I would break this further. I would have the rowcount error if the problem case is encountered, rather than being incorrect. But that is asking someone to do more work, and that someone is not going to be myself.

@erlend-aasland
Copy link
ContributorAuthor

As a developer in the Python ecosystem I have had more breaking changes than I would like in both standard library modules and core tools like the packaging tools, this is the third recently. Each of these is regrettable and incurs both unwanted work and confusion.

I understand your frustration, and thank you for speaking up. Note that we really strive to avoid these kinds of changes; backwards compatibility is a priority. Unfortunately, as I wrote on the issue, we sometimes take the wrong step. In this case, the backwards compatibility issues were not immediately obvious.

Documentation would be good. I would recommend that all breaking changes are clearly and explicitly documented, both in what's new and in the library documentation. I understand that you have a lot of demands on your time, so that would be appreciated.

All known breaking changes are always documented, both in the changelog (NEWS entries) and in What's New. We've also introduced a new category in What's New for pending breaking changes, in order to better prepare users of stuff like deprecated APIs being removed in a future version. Of course, this implies that we know that a change is a breaking change; this was unfortunately not the case for the changes that lead to your specific problem here. IMO, the best we can do now, is to improve the existing documentation, which is what I'm trying to do with this PR.

Personally, I would break this further. I would have the rowcount error if the problem case is encountered, rather than being incorrect. But that is asking someone to do more work, and that someone is not going to be myself.

That is a slight change in the existing semantics ofrowcount, so we'd have to think that through very carefully, as it may be another breaking change. For the sake of stability, I'd prefer to keep the status quo, and simply document how to use the APIs.

@miss-islington
Copy link
Contributor

Thanks@erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@erlend-aaslanderlend-aasland deleted the docs/sqlite-returning-clauses-and-rowcount branchMay 11, 2023 08:44
@miss-islington
Copy link
Contributor

Sorry@erlend-aasland, I had trouble checking out the3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker 7470321f8171dce96a604ba2c24176837f999ca0 3.11

@erlend-aasland
Copy link
ContributorAuthor

Thanks for the review, Alex, and thanks for your input Roger.

AlexWaygood reacted with thumbs up emoji

erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull requestMay 11, 2023
…ocs (python#104287)The SQLite C API sqlite3_changes() can only be relied upon when thecurrent active statement has been run to completion.
@bedevere-bot
Copy link

GH-104381 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelMay 11, 2023
erlend-aasland added a commit that referenced this pull requestMay 11, 2023
…104287) (#104381)The SQLite C API sqlite3_changes() can only be relied upon when thecurrent active statement has been run to completion.
carljm added a commit to carljm/cpython that referenced this pull requestMay 11, 2023
* main: (27 commits)pythongh-87849: fix SEND specialization family definition (pythonGH-104268)pythongh-101819: Adapt _io.IOBase.seek and _io.IOBase.truncate to Argument Clinic (python#104384)pythongh-101819: Adapt _io._Buffered* methods to Argument Clinic (python#104367)pythongh-101819: Refactor `_io` futher in preparation for module isolation (python#104369)pythongh-101819: Adapt _io.TextIOBase methods to Argument Clinic (python#104383)pythongh-101117: Improve accuracy of sqlite3.Cursor.rowcount docs (python#104287)pythonGH-92184: Convert os.altsep to '/' in filenames when creating ZipInfo objects (python#92185)pythongh-104357: fix inlined comprehensions that close over iteration var (python#104368)pythonGH-90208: Suppress OSError exceptions from `pathlib.Path.glob()` (pythonGH-104141)pythonGH-102181: Improve specialization stats for SEND (pythonGH-102182)pythongh-103000: Optimise `dataclasses.asdict` for the common case (python#104364)pythongh-103538: Remove unused TK_AQUA code (pythonGH-103539)pythonGH-87695: Fix OSError from `pathlib.Path.glob()` (pythonGH-104292)pythongh-104263: Rely on Py_NAN and introduce Py_INFINITY (pythonGH-104202)pythongh-104010: Separate and improve docs for `typing.get_origin` and `typing.get_args` (python#104013)pythongh-101819: Adapt _io._BufferedIOBase_Type methods to Argument Clinic (python#104355)pythongh-103960: Dark mode: invert image brightness (python#103983)pythongh-104252: Immortalize Py_EMPTY_KEYS (pythongh-104253)pythongh-101819: Clean up _io windows console io afterpythongh-104197 (python#104354)pythongh-101819: Harden _io init (python#104352)  ...
carljm added a commit to carljm/cpython that referenced this pull requestMay 11, 2023
* main:pythongh-87849: fix SEND specialization family definition (pythonGH-104268)pythongh-101819: Adapt _io.IOBase.seek and _io.IOBase.truncate to Argument Clinic (python#104384)pythongh-101819: Adapt _io._Buffered* methods to Argument Clinic (python#104367)pythongh-101819: Refactor `_io` futher in preparation for module isolation (python#104369)pythongh-101819: Adapt _io.TextIOBase methods to Argument Clinic (python#104383)pythongh-101117: Improve accuracy of sqlite3.Cursor.rowcount docs (python#104287)pythonGH-92184: Convert os.altsep to '/' in filenames when creating ZipInfo objects (python#92185)pythongh-104357: fix inlined comprehensions that close over iteration var (python#104368)pythonGH-90208: Suppress OSError exceptions from `pathlib.Path.glob()` (pythonGH-104141)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

@CAM-GerlachCAM-GerlachAwaiting requested review from CAM-Gerlach

Assignees

@erlend-aaslanderlend-aasland

Labels
docsDocumentation in the Doc dirskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@erlend-aasland@rt121212121@miss-islington@bedevere-bot@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp