Skip to content
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

gh-95235: Add explicit parameter list to some sqlite3 methods #95240

Merged
merged 8 commits into from
Jul 26, 2022

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Jul 25, 2022

@erlend-aasland erlend-aasland added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Jul 25, 2022
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

Great stuff, thanks.

Do you think its worth adding a mention to the relevant parameters that are keyword or (especially, since their name is given) positional-only?

Also, given they are positional only, would it make sense to rename the narg/n_arg/num_params parameter, which is otherwise identical, to be consistant across the three functions? There's no obvious reason why it has a different name in each despite having a seemingly identical purpose and behavior.

Doc/library/sqlite3.rst Show resolved Hide resolved
Doc/library/sqlite3.rst Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

Do you think its worth adding a mention to the relevant parameters that are keyword or (especially, since their name is given) positional-only?

I'm not sure it's needed. The signature is just above the parameter list, so IMO there is no need. I have no strong opinion about it though; I could easily be convinced otherwise.

Also, given they are positional only, would it make sense to rename the narg/n_arg/num_params parameter, which is otherwise identical, to be consistant across the three functions?

But it's not: create_aggregate has only one position-only parameter; n_arg can be specified as a keyword. I do dislike the current situation though. Personally I'd go with simply n or nargs.

@erlend-aasland
Copy link
Contributor Author

Suggestions applied; a great improvement. Thanks again.

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM now, thanks @erlend-aasland

@erlend-aasland erlend-aasland merged commit 5012bed into python:main Jul 26, 2022
@miss-islington
Copy link
Contributor

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

@erlend-aasland erlend-aasland deleted the sqlite-doc-parameter-lists branch July 26, 2022 06:29
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 26, 2022
…ythonGH-95240)

Co-authored-by: CAM Gerlach <[email protected]>
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 26, 2022
@miss-islington
Copy link
Contributor

Sorry, @erlend-aasland, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 5012bedc7ca7d78b5a42bf60eef55bac263f4060 3.10

@bedevere-bot
Copy link

GH-95263 is a backport of this pull request to the 3.11 branch.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 26, 2022
…thods (pythonGH-95240)

Co-authored-by: CAM Gerlach <[email protected]>.
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jul 26, 2022
@bedevere-bot
Copy link

GH-95268 is a backport of this pull request to the 3.10 branch.

erlend-aasland added a commit that referenced this pull request Jul 26, 2022
…H-95240) (#95268)

Co-authored-by: CAM Gerlach <[email protected]>.
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <[email protected]>
ambv pushed a commit that referenced this pull request Jul 26, 2022
…) (GH-95263)

Co-authored-by: CAM Gerlach <[email protected]>
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants