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 — Calendar fails to produce html on year and month · Issue #140212 · python/cpython

Calendar fails to produce html on year and month #140212

New issue
Copy link
New issue
Copy link
Closed
Closed
Calendar fails to produce html on year and month#140212
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@pgdr
pgdr
opened on Oct 16, 2025
Issue body actions

Bug report

Bug description:

Calling

python -m calendar -t html 2025 10

results in the message error: incorrect number of arguments.

However, according to the arguments, it should be supported:

calendar.py [-h] [-w WIDTH] [-l LINES] [-s SPACING] [-m MONTHS] [-c CSS] [-L LOCALE] [-e ENCODING] [-t {text,html}] [-f FIRST_WEEKDAY] [year] [month]

I have attached a patch, and if there's support for it, I can create a PR for it.

0001-Add-calendar-year-month-support-for-html.patch

CPython versions tested on:

3.12, 3.13, 3.14

Operating systems tested on:

Linux

Linked PRs

  • gh-140212: Add html for year-month option in Calendar #140230

Activity

  1. pgdr
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 16, 2025
  2. tanloong commented on Oct 16, 2025

    @tanloong
    tanloong
    on Oct 16, 2025
    Contributor
    More actions

    I just found the change that brings about this behavior: 8b7bc06

    The more original change: 49fd7fa#diff-7976dc087a43c5bd465c0df88ff25bca03e469ea5d17478d81fd17472df87c28R678

  3. StanFromIreland
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Oct 16, 2025
  4. StanFromIreland
    added this to Date and time issues 🕰️on Oct 16, 2025
  5. StanFromIreland commented on Oct 16, 2025

    @StanFromIreland
    StanFromIreland
    on Oct 16, 2025
    Member
    More actions

    It has been like this for many versions, so I think this is a feature.

    CC @AA-Turner

  6. StanFromIreland
    added
    type-featureA feature request or enhancementA feature request or enhancement
    and removed
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 16, 2025
  7. pgdr
    added a commit that references this issue on Oct 16, 2025

    pythongh-140212: Add html for year-date option in Calendar

    1a9f1fb
  8. pgdr commented on Oct 16, 2025

    @pgdr
    pgdr
    on Oct 16, 2025
    ContributorAuthor
    More actions

    @StanFromIreland Added PR in #140230

  9. bxsx commented on Oct 16, 2025

    @bxsx
    bxsx
    on Oct 16, 2025
    Contributor
    More actions

    Hi! I’m not 100% sure right now (and I don’t have access to my laptop this week), but I think I considered adding this feature when I was working on that test coverage. In the end, I came across a very old thread (maybe a patch review?) where @rhettinger was opposed to changing the module’s interface and/or output — and his arguments were very solid. Maybe Raymond can quickly weigh in on this..

  10. pgdr
    added a commit that references this issue on Oct 16, 2025

    pythongh-140212: Add blurb for calendar fix

    4c3384b
  11. pgdr commented on Oct 22, 2025

    @pgdr
    pgdr
    on Oct 22, 2025
    ContributorAuthor
    More actions

    @bxsx @rhettinger If this fix is not wanted, I think we should at fix the error message error: incorrect number of arguments.

    It would be better to say something like error: HTML formatting does not support year-month option.

    The PR #140230 is in any case ready to be reviewed.

  12. hugovk
    added a commit that references this issue on Oct 31, 2025

    gh-140212: Add html for year-month option in Calendar (#140230)

    07912f8
  13. hugovk
    closed this as completedon Oct 31, 2025
  14. github-project-automation
    moved this to Done in Date and time issues 🕰️on Oct 31, 2025
  15. StanFromIreland
    added a commit that references this issue on Dec 6, 2025

    pythongh-140212: Add html for year-month option in Calendar (python#1…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

    Projects

    • Date and time issues 🕰️
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.