8000 gh-133447: Add basic color to `sqlite3` CLI by StanFromIreland · Pull Request #133461 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-133447: Add basic color to sqlite3 CLI #133461

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

Merged
merged 16 commits into from
May 10, 2025

Conversation

StanFromIreland
Copy link
Contributor
@StanFromIreland StanFromIreland commented May 5, 2025

Copy link
Contributor
@sharktide sharktide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me

@tomasr8
Copy link
Member
tomasr8 commented May 6, 2025

Now that #133347 has been merged, we could take advantage of it in the sqlite CLI as well?

@StanFromIreland
Copy link
Contributor Author
StanFromIreland 8000 commented May 6, 2025

cc @ambv Just to check -- did I use themes correctly or did I do something wrong (there is no docs at the moment to verify)?

Copy link
Contributor
@ambv ambv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there are no docs so I'll push here with how I'd do it if that's okay.

@StanFromIreland StanFromIreland requested a review from ambv May 6, 2025 18:27
Copy link
Contributor
@ambv ambv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know what you think.

@StanFromIreland
Copy link
Contributor Author

Looks good to me now, thank you for the assistance:-)

If you need help with colorise I’d be happy to lend a hand.

@ambv
Copy link
Contributor
ambv commented May 6, 2025

Excellent! Since all this is already for 3.15, I think we might attempt a SQL syntax highlighter as well, although I'm not entirely sure our tokenizer will take kindly to it, so this might become a larger task. We have plenty of time, though.

@erlend-aasland erlend-aasland changed the title gh-133447: Add basic color to sqlite3 cli gh-133447: Add basic color to sqlite3 CLI May 7, 2025
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@erlend-aasland
Copy link
Contributor

Excellent! Since all this is already for 3.15, I think we might attempt a SQL syntax highlighter as well, although I'm not entirely sure our tokenizer will take kindly to it, so this might become a larger task. We have plenty of time, though.

SQL highlighting would be awesome.

@StanFromIreland
Copy link
Contributor Author
StanFromIreland commented May 7, 2025

All the test fails are unrelated.

SQL highlighting would be awesome.

Working on it :-)

@erlend-aasland
Copy link
Contributor

@StanFromIreland, please look into the failing tests.

@StanFromIreland
Copy link
Contributor Author

I was testing the broken behavior that was now fixed, oops!

@StanFromIreland
Copy link
Contributor Author

@erlend-aasland Test has been corrected to work with the new updates.

@erlend-aasland erlend-aasland enabled auto-merge (squash) May 10, 2025 07:35
@erlend-aasland erlend-aasland merged commit 30b1d8f into python:main May 10, 2025
39 checks passed
@StanFromIreland StanFromIreland deleted the color_step1 branch May 10, 2025 07:59
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM64 Windows 3.x (tier-3) has failed when building commit 30b1d8f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/729/builds/8781) and take a look at the build logs.
  4. Check if the failure is related to this commit (30b1d8f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/729/builds/8781

Failed tests:

  • test_zipfile

Failed subtests:

  • test_write_without_source_date_epoch - test.test_zipfile.test_core.OtherTests.test_write_without_source_date_epoch

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64\build\Lib\test\test_zipfile\test_core.py", line 1832, in test_write_without_source_date_epoch
    self.assertAlmostEqual(z_time, c_time, delta=1)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 28 != 30 within 1 delta (2 difference)


Traceback (most recent call last):
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64\build\Lib\test\test_zipfile\test_core.py", line 1832, in test_write_without_source_date_epoch
    self.assertAlmostEqual(z_time, c_time, delta=1)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 36 != 38 within 1 delta (2 difference)

@StanFromIreland
Copy link
Contributor Author

Unrelated.

tanloong pushed a commit to tanloong/cpython that referenced this pull request May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0