| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
The sqlite3 CLI supports also space after dot:
sqlite> . version SQLite 3.45.1 2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1 zlib version 1.3 gcc-13.3.0 (64-bit)
But not before dot:
sqlite> .version ...>
To be conforming with it, we should check if the first character is a dot, and if it is, use source[1:].strip() as the command. No stripping is needed for the SQL statement.
Sorry, something went wrong.
|
Thank you for your review! I have modified the code to use source[1:].strip() as dot command, no stripping for SQL statement. |
Sorry, something went wrong.
|
Sorry for the overlook, now the empty source and unknown dot commands are handled. I have improved the news entry. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. 👍
Sorry, something went wrong.
Head branch was pushed to by a user without write access
|
Thanks @tanloong for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
…or multi-line sqlite statements in the sqlite3 command-line interface (pythonGH-133440) (cherry picked from commit ebd4881) Co-authored-by: Tan Long <tanloong@foxmail.com>
|
GH-133738 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
This is borderline between minor bug fix and minor feature. It improves the quality of life a little, but most people won't notice anything. If anyone wants to backport to 3.13, please do. If not, no problem either. |
Sorry, something went wrong.
|
I will do that. |
Sorry, something went wrong.
|
GH-133765 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
@tanloong, I meant any of the core developers. It's as simple as adding a label. Someone just has to want to do it. |
Sorry, something went wrong.
|
Ah, sorry, I misunderstood. |
Sorry, something went wrong.
…or multi-line sqlite statements in the sqlite3 command-line interface (pythonGH-133440) (cherry picked from commit ebd4881)
| pass | ||
| case _ as unknown: | ||
| self.write("Error: unknown command or invalid arguments:" | ||
| f' "{unknown}".\n') |
There was a problem hiding this comment.
Error messages do not end with a '.' e.g.:
Python 3.15.0a0 (heads/main:c81fa2b9cd1, May 8 2025, 16:38:25) [GCC 15.1.1 20250425 (Red Hat 15.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> test
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
test
NameError: name 'test' is not defined
Sorry, something went wrong.
…or multi-line sqlite statements in the sqlite3 command-line interface (pythonGH-133440)
…or multi-line sqlite statements in the sqlite3 command-line interface (pythonGH-133440)
| Back | FazBrowse Home | New Git URL |
Issue: sqlite3 CLI does not recognize dot commands with trailing spaces #133439