Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-133390: Support SQL keyword completion for sqlite3 CLI#133393
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
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
54 commits Select commitHold shift + click to select a range
1b96be3 Support basic completion for sqlite3 command-line interface
tanloong5e50871 Add news entry
tanloongc1941cb Move completion code to separate module
tanloong47daca5 Update Lib/sqlite3/_completer.py
tanloongc54c2f6 Update Doc/whatsnew/3.14.rst
tanloong8fff491 Add test
tanloonga766805 Move keyword list to module level
tanloongda55014 Remove whatsnew entry from 3.14
tanloongca587e0 Avoid regeneration of candidates. Store them when state is 0 and returns
tanloong311b4f3 Add whatsnew entry to 3.15
tanloong70f46e9 Address Bénédikt's review
tanloong9d03730 Remove color handling of output; If CI fails might need to add back
tanloongbfcff38 Fix `run_pty()` doesn't return and test hangs
tanloong805d997 Revert "Remove color handling of output; If CI fails might need to ad…
tanloong276b4a7 Turn off colored-completion-prefix for readline
tanloong09eeac8 No need to pass "NO_COLOR" to `run_pty()`
tanloongfc57d71 Flip name
tanloongc508069 Triggering completion on Ubuntu requires 2 tabs
tanloong231b9e7 Move KEYWORDS to C
tanloong121b069 Improve style of C code
tanloong90a86cf Improve tests
tanloong5170733 Address Bénédikt's review
tanloongb40982a Revert "Improve style of C code"
tanloong226ea9f Revert "Move KEYWORDS to C"
tanloong4eebbd9 Read keyword names dynamically
encukou3f9b2c1 Check candidates against KEYWORDS
tanloong0410fa2 Use slice to get candidates
tanloongbd0b9ce Address Bénédikt's review
tanloong35a17e7 Make candidates tuple
tanloong3dd16b3 Revert "Revert "Move KEYWORDS to C""
tanloongf3ea951 Revert "Revert "Improve style of C code""
tanloonga493ad3 Merge pull request #2 from encukou/sqlite3-cli-completion
tanloong34cfc78 Fix 'KEYWORDS' not found
tanloong477b48b Sort keywords before checking the equality
tanloong68bb4f3 Fix comparing between tuple and list
tanloong4c3b122 Fix comparing between tuple and list
tanloong4f1221e Rename 'test_completion_order' to 'test_completion_for_nothing'
tanloong3865131 Don't decrease reference for `PyModule_Add()` and `PyTuple_SetItem()`
tanloong8d4f659 Merge branch 'main' into sqlite3-cli-completion
encukouccd98a5 Add @force_not_colorized_test_class
tanloongd681425 Merge branch 'main' into sqlite3-cli-completion
encukouffd0f02 Add two '\b\b'; Skip tests on FreeBSD
tanloong6188a6d Amend skipping reason
tanloong370dd8b Remove comment 'set the keyword tuple'
tanloong16b1674 Disable keyword completion for SQLite<3.24.0
tanloongea108ba Don't disable the whole completion in case there will be more completion
tanloong13b527e Use compile-time check
tanloongfafd1bb Correct #if usage
tanloong140818c Wrap add_keyword_tuple() definition and its call in #if/#endif
tanloongfd6c89e Suggestions to python/cpython#133393
erlend-aasland588fb6a Merge pull request #3 from erlend-aasland/suggestion
tanloong5623f16 Merge branch 'main' into sqlite3-cli-completion
erlend-aasland88c8d59 Update Doc/whatsnew/3.15.rst
erlend-aaslandb3a2b88 Merge branch 'main' into sqlite3-cli-completion
erlend-aaslandFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Don't decrease reference for
PyModule_Add() andPyTuple_SetItem()- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit3865131c6c6d91b01df2ac2f3bdcede302c7a30e
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -427,14 +427,10 @@ add_keyword_tuple(PyObject *module) | ||
| goto error; | ||
| } | ||
| if (PyTuple_SetItem(keywords, i, kwd) < 0) { | ||
serhiy-storchaka marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| goto error; | ||
| } | ||
| } | ||
| return PyModule_Add(module, "SQLITE_KEYWORDS", keywords); | ||
| error: | ||
| Py_XDECREF(keywords); | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.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.Add this suggestion to a batch that can be applied as a single commit.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.Suggestion cannot be applied right now. Please check back later.