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

sqlite3: Connection.create_collation() documentation inaccuracies #92780

Closed
AdrianIssott opened this issue May 13, 2022 · 2 comments · Fixed by #92790
Closed

sqlite3: Connection.create_collation() documentation inaccuracies #92780

AdrianIssott opened this issue May 13, 2022 · 2 comments · Fixed by #92790
Labels
docs Documentation in the Doc dir topic-sqlite3

Comments

@AdrianIssott
Copy link

Documentation

Currently the documentation of sqlite3.create_collation() (https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.create_collation) says:

Note that the callable will get its parameters as Python bytestrings, which will normally be encoded in UTF-8.

However, as you can see from the discussion on #92742 that's incorrect in python 3 and the callable gets its parameters as Python strs which matches the SQLite docs which says:

Collating functions only matter when comparing string values

@AdrianIssott AdrianIssott added the docs Documentation in the Doc dir label May 13, 2022
@erlend-aasland erlend-aasland changed the title The documentation of sqlite3.create_collation() should say the callable gets its parameters as strings sqlite3: Connection.create_collation() documentation inaccuracies May 13, 2022
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue May 13, 2022
@erlend-aasland
Copy link
Contributor

Would you mind reviewing the proposed change, @AdrianIssott?

erlend-aasland added a commit that referenced this issue May 18, 2022
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 18, 2022
…honGH-92790)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 7ee19e2)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 18, 2022
…honGH-92790)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 7ee19e2)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 18, 2022
…honGH-92790)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 7ee19e2)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue May 18, 2022
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 7ee19e2)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue May 18, 2022
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 7ee19e2)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
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 topic-sqlite3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants