gh-140212: Add html for year-month option in Calendar#140230
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Note that the html produced in I didn't do this at this stage because it would actually be a larger change, and I'm not sure this will be merged regardless. Let me know if I should extract the common code out. |
StanFromIreland
left a comment
There was a problem hiding this comment.
Please add a blurb and docs.
|
@StanFromIreland I have added a blurb and updated documentation for Calendar's argparser. I was not sure if the blurb was supposed to go in I have updated the docs as well. I think it's best to squash the commits before a hypothetical merging. I'll do so upon request. |
|
It should be in Library. Squash is done by the commiter, please don't force push, it only causes confusion. |
|
@StanFromIreland I have moved the blurb to Library. |
Contributed by hugovk Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
Please could you also list this in What's New? |
|
@hugovk It's done (given that the entry is acceptable). |
|
@AA-Turner Let me know if there is anything I can do at this point to get this PR merged. |
|
Let's merge, thanks! |
|
…40230) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

Running
python3.13 -m calendar 2025pretty-prints the calendar for all of 2025. If we add the month at the end, it only prints the month.python3.13 -m calendar 2025It is possible to get HTML output by using
python -m calendar -t html 2025, which gives the calender for 2025 in HTML format.However, if we add the month,
python -m calendar -t html 2025 10it fails:This PR simply adds support for HTML-formatting the year-month option.
A test is included, and one existing test is removed: a test verifying that the year month option fails.