Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-133439: Fix the error message in the sqlite3 CLI#133807
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
StanFromIreland commented May 10, 2025 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
picnixz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this PR is needed anymore, except maybe for the assertIn
StanFromIreland commented May 10, 2025
Should the error message not be consistent with all other cpython error messages? I think it is still better to use |
picnixz commented May 10, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I guess so. I actually expected |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Bénédikt Tran <[email protected]>
StanFromIreland commented Jun 12, 2025
While working on something else I realized the current error message is error-ed even more: Friendly ping @erlend-aasland |
erlend-aasland commented Jun 13, 2025
Stan, did you want to include further amendments in this PR? |
StanFromIreland commented Jun 13, 2025
I don't mind, I can include it here. All that is to be done for the |
Uh oh!
There was an error while loading. Please reload this page.
Lib/sqlite3/__main__.py Outdated
| t = theme.traceback | ||
| self.write(f'{t.type}Error{t.reset}:{t.message} unknown' | ||
| f'command or invalid arguments: "{unknown}".\n{t.reset}') | ||
| print(f'{t.type}Error{t.reset}:{t.message} unknown command ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the banner and tracebacks are written using self.write(). Why not use it here for consistence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors (35) use print? And so do the other match statements branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other branches output to stdout.
Line 35 perhaps should use self.write() too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can leave execute() for now. It is not worth to rewrite it just for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| print(f'{t.type}Error{t.reset}:{t.message} unknown command ' | |
| self.write(f'{t.type}Error{t.reset}:{t.message} unknown command ' |
It is up to you/Erlend. The box to allow you to commit was checked.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ecd83e0 into python:mainUh oh!
There was an error while loading. Please reload this page.
Thanks @StanFromIreland for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, @StanFromIreland and @encukou, I could not cleanly backport this to |
StanFromIreland commented Jun 19, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
The original was "backported" to 3.13 but it seems it was modified: cpython/Lib/sqlite3/__main__.py Lines 64 to 65 in 55a34a1
@encukou Should we backport this (to 3.13) too so they are the same? |
GH-135708 is a backport of this pull request to the 3.14 branch. |
…honGH-133807) (cherry picked from commit ecd83e0) Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
encukou commented Jun 19, 2025
Now that I look at the diff, I don't see a bug to fix in 3.14. |
StanFromIreland commented Jun 19, 2025
There is no bug because the author modified the backport, the message is different though. |
…33807) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…33807) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…33807) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…33807) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
printfor file consistencyRequest: @erlend-aasland