GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-148352: Add more colour to `calendar` CLI output by hugovk · Pull Request #148354 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented Apr 10, 2026 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

In Python 3.14, we added an amazing colour highlight for today: #128318.

Let's add a touch more colour.

Before After
Image Image
  • Issue: Add more colour to calendar CLI output #148352

📚 Documentation preview 📚: https://cpython-previews--148354.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

danielhollas reacted with heart emoji
All reactions
  • ❤️ 1 reaction
hugovk added 4 commits April 10, 2026 20:08
@hugovk
Add more colour to calendar
9e95c43
@hugovk
Use ArgumentDefaultsHelpFormatter for better help
1fe0d93
@hugovk
Re-order calendar what's new
3343a36
@hugovk
Docs
0843e5b
@hugovk
hugovk requested a review from AA-Turner as a code owner April 10, 2026 17:27
@hugovk hugovk added the stdlib Standard Library Python modules in the Lib/ directory label Apr 10, 2026
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 10, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 10, 2026
Add more colour to calendar CLI output #148352
Closed
sharktide
sharktide reviewed Apr 10, 2026
View reviewed changes
Comment thread Doc/library/calendar.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hugovk @sharktide
Improve docs
4b202f0
Co-authored-by: Rihaan Meher <[email protected]>
sharktide
sharktide reviewed Apr 10, 2026
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2026-04-10-20-23-22.gh-issue-148352.lrec3W.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/calendar.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sharktide

This comment was marked as resolved.

Sign in to view
@hugovk @sharktide
Update NEWS
cab1a52
Co-authored-by: Rihaan Meher <[email protected]>
sharktide
sharktide reviewed Apr 11, 2026
View reviewed changes

@sharktide sharktide left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM, thanks @hugovk :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@johnslavik
johnslavik self-requested a review April 14, 2026 23:52
@hugovk
Merge branch 'main' into 3.15-calendar-colour
f25c42c
@hugovk hugovk mentioned this pull request Apr 26, 2026
Add colour to pickletools CLI output #149026
Closed
StanFromIreland
StanFromIreland reviewed May 4, 2026
View reviewed changes
Comment thread Lib/test/test_calendar.py Outdated
@@ -1122,4 +1123,4 @@
self.assertCmdFails(*args)

@support.force_not_colorized

@StanFromIreland StanFromIreland May 4, 2026

Copy link
Copy Markdown
Member

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.

Can be removed, no?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@hugovk hugovk May 4, 2026

Copy link
Copy Markdown
Member Author

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.

Removed!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_calendar.py
self.assertCmdFails(*args)

@support.force_not_colorized
def test_help(self):

@StanFromIreland StanFromIreland May 4, 2026

Copy link
Copy Markdown
Member

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.

Can we also have a case checking for color?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@hugovk hugovk May 4, 2026

Copy link
Copy Markdown
Member Author

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.

Added!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hugovk added 3 commits May 4, 2026 13:57
@hugovk
Merge remote-tracking branch 'upstream/main' into 3.15-calendar-colour
7e45a80
@hugovk
Remove redundant decorator
6719b32
@hugovk
Add test for colour
ca4ab58
@read-the-docs-community

read-the-docs-community Bot commented May 4, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32524822 | 📁 Comparing ca4ab58 against main (1e7dfbc)

  🔍 Preview build  

52 files changed · + 1 added · ± 51 modified

+ Added

  • c-api/sentinel.html

± Modified

  • glossary.html
  • c-api/concrete.html
  • c-api/perfmaps.html
  • deprecations/index.html
  • deprecations/pending-removal-in-3.18.html
  • deprecations/pending-removal-in-3.19.html
  • deprecations/pending-removal-in-3.20.html
  • faq/programming.html
  • howto/descriptor.html
  • howto/perf_profiling.html
  • and 41 more...
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed May 4, 2026
View reviewed changes
Comment thread Lib/test/test_calendar.py
today = datetime.date(2026, 5, 4)
cal = calendar._CLIDemoCalendar(highlight_day=today)
output = cal.formatmonth(2026, 5)
self.assertIn("\x1b[30m\x1b[43mMay 2026\x1b[0m\n\x1b[36m", output)

@StanFromIreland StanFromIreland May 4, 2026

Copy link
Copy Markdown
Member

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.

Hmm, do we support running tests with different themes? If a user has a custom theme this test will fail.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@hugovk hugovk May 4, 2026

Copy link
Copy Markdown
Member Author

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 don't support running tests with different themes.

Other tests could also break if the user changed the theme:

❯ rg "x1b" Lib/test/test_*.py -l | wc -l
      13

Right now the theme API is internal/private. If we make it public in a later release, we'll need to consider tests are with the default theme or a specific theme.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
StanFromIreland
StanFromIreland approved these changes May 4, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

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.

LGTM :-) 🌈

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 4, 2026
@hugovk
hugovk merged commit 2ba0a81 into python:main May 4, 2026
64 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
hugovk deleted the 3.15-calendar-colour branch May 4, 2026 12:15
@bedevere-app bedevere-app Bot removed the awaiting merge label May 4, 2026
@hugovk

hugovk commented May 4, 2026

Copy link
Copy Markdown
Member Author

Thanks @sharktide and @StanFromIreland for the reviews!

StanFromIreland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@StanFromIreland StanFromIreland StanFromIreland approved these changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@johnslavik johnslavik Awaiting requested review from johnslavik
+1 more reviewer
@sharktide sharktide sharktide left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

stdlib Standard Library Python modules in the Lib/ directory

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@hugovk @sharktide @StanFromIreland
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.