{{ message }}
bpo-16379: expose SQLite error codes and error names in sqlite3#27786
Merged
pablogsal merged 34 commits intoAug 30, 2021
Merged
bpo-16379: expose SQLite error codes and error names in sqlite3#27786pablogsal merged 34 commits into
sqlite3#27786pablogsal merged 34 commits into
Conversation
- Naming: sqlite3ErrName => pysqlite_error_name
- Error handling:
* return NULL if no exception matched
* receiver handles errors
* don't use error table to store SQLITE_UNKNOWN string
- Use intermingled declarations - Simplify ref count handling
- Declutter add_error_constants() - No need to typedef struct - Simplify naming - Use PyModule_AddIntConstant
To avoid mismatch between char *name and constant
IMO, we should not pollute the SQLITE_* namespace
- Use correct attribute name - Normalise error variable naming - Remove 'Errno' from printed string to avoid confusion
- Use assertRaisesRegex iso. two assert functions - Normalise quotes - Test that constants are added to the module
10 hidden items
Load more…
Contributor
Author
|
cc. @auvipy & @matrixise who reviewed the original PR. |
Sorry, something went wrong.
auvipy
approved these changes
Aug 18, 2021
Contributor
Author
|
FYI, I pushed a small tweak to the unit test: use the Thanks for reviewing, @auvipy |
Sorry, something went wrong.
shihai1991
approved these changes
Aug 22, 2021
pablogsal
reviewed
Aug 25, 2021
Contributor
Author
Sorry, something went wrong.
Spacetown
reviewed
Aug 26, 2021
Spacetown
reviewed
Aug 26, 2021
pablogsal
approved these changes
Aug 30, 2021
pablogsal
left a comment
Member
There was a problem hiding this comment.
LGTM.
Good work!
Sorry, something went wrong.
Contributor
Author
|
Thanks Pablo, and you can thank @danielshahaf & @palaviv for the good work; I just "stole" it, rebased onto |
Sorry, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.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.
Original PR: GH-1108 (contributed by @palaviv, based on patches by @danielshahaf)
This PR is a rebase and rework of Aviv & Daniel's work.
Co-authored-by: Aviv Pavlivoda
Co-authored-by: Daniel Shahaf
Co-authored-by: Erlend E. Aasland
https://bugs.python.org/issue16379