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-95273: Reorganize sqlite3 doc module level funcs and vars #95626

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Aug 3, 2022

Put module level functions before module level attributes, and (mostly)
sort them alphabetically. This makes sqlite3.connect() the first
encounter in the sqlite3 reference.

Put module level functions before module level attributes, and (mostly)
sort them alphabetically.  This makes sqlite3.connect() the first
encounter in the sqlite3 reference.
@erlend-aasland
Copy link
Contributor Author

Other things to note, aside of the nice sqlite3.connect promotion:

  • sqlite3.version* is now at the end; that's ok, since they're confusing to people, and they are deprecated :)
  • it's almost alphabetically sorted, but we cannot start with the obscure sqlite3.complete_statement1

Footnotes

  1. ... which has a far too large example for being such an obscure function; IMO, we can remove that example (or at least greatly simplify it), or maybe just point to the source code of the newly added sqlite3 CLI.

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 idea overall, this is certainly a significant improvement. There is one serious syntax issue that needs to be fixed, and I wonder whether it might be a better idea to split the module-level constants and functions into two separate sections for clarity.

Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Copy link
Member

@ezio-melotti ezio-melotti left a comment

Choose a reason for hiding this comment

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

The changes LGTM, assuming you just moved things around and wrapped a few long lines.

Doc/library/sqlite3.rst Show resolved Hide resolved
Copy link
Member

@ezio-melotti ezio-melotti left a comment

Choose a reason for hiding this comment

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

A small inconsequential nit, otherwise LGTM.
I've seen refs without spaces elsewhere, so you might want to double-check the whole file, possibly in a separate PR (perhaps together with adding ! to `:mod:`sqlite3`).

Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
@erlend-aasland erlend-aasland changed the title gh-95273: Re-organize sqlite3 doc module level funcs and attrs gh-95273: Reorganize sqlite3 doc module level funcs and attrs Aug 4, 2022
@erlend-aasland erlend-aasland changed the title gh-95273: Reorganize sqlite3 doc module level funcs and attrs gh-95273: Reorganize sqlite3 doc module level funcs and variables Aug 4, 2022
@erlend-aasland erlend-aasland changed the title gh-95273: Reorganize sqlite3 doc module level funcs and variables gh-95273: Reorganize sqlite3 doc module level funcs and vars Aug 4, 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.

LGTM, just a couple tiny nits.

Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Show resolved Hide resolved
Erlend Egeberg Aasland and others added 5 commits August 5, 2022 08:22
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Copy link
Member

@ezio-melotti ezio-melotti left a comment

Choose a reason for hiding this comment

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

One last suggestion, but otherwise LGTM.

Doc/library/sqlite3.rst Show resolved Hide resolved
@erlend-aasland erlend-aasland merged commit 41c939c into python:main Aug 8, 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.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @erlend-aasland, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 41c939cb35cda395388a775156c367676efffebe 3.11

@erlend-aasland erlend-aasland deleted the sqlite-reference/structure/module-level-stuff branch August 8, 2022 19:25
@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 41c939cb35cda395388a775156c367676efffebe 3.10

erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Aug 8, 2022
…vars (pythonGH-95626)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 41c939c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 8, 2022
@bedevere-bot
Copy link

GH-95801 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 Aug 8, 2022
…vars (pythonGH-95626)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 41c939c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Aug 8, 2022
@bedevere-bot
Copy link

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

erlend-aasland added a commit that referenced this pull request Aug 8, 2022
…H-95626) (#95803)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 41c939c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
erlend-aasland added a commit that referenced this pull request Aug 9, 2022
…H-95626) (#95801)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 41c939c)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request Aug 11, 2022
…ython#95626)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
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.

5 participants