Title: calendar.HTMLCalendar.formatmonthpage has a bogus width argument · Issue #153158 · python/cpython · GitHub
Open Graph Title: calendar.HTMLCalendar.formatmonthpage has a bogus width argument · Issue #153158 · python/cpython
X Title: calendar.HTMLCalendar.formatmonthpage has a bogus width argument · Issue #153158 · python/cpython
Description: HTMLCalendar.formatmonthpage, added in 3.15, takes a width argument: def formatmonthpage(self, theyear, themonth, width=3, css='calendar.css', encoding=None): ... v.append(self.formatmonth(theyear, themonth, width)) The signature was cop...
Open Graph Description: HTMLCalendar.formatmonthpage, added in 3.15, takes a width argument: def formatmonthpage(self, theyear, themonth, width=3, css='calendar.css', encoding=None): ... v.append(self.formatmonth(theyear,...
X Description: HTMLCalendar.formatmonthpage, added in 3.15, takes a width argument: def formatmonthpage(self, theyear, themonth, width=3, css='calendar.css', encoding=None): ... v.append(self.formatmonth(...
Opengraph URL: https://github.com/python/cpython/issues/153158
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"calendar.HTMLCalendar.formatmonthpage has a bogus width argument","articleBody":"`HTMLCalendar.formatmonthpage`, added in 3.15, takes a `width` argument:\n\n```python\ndef formatmonthpage(self, theyear, themonth, width=3, css='calendar.css', encoding=None):\n ...\n v.append(self.formatmonth(theyear, themonth, width))\n```\n\nThe signature was copied from `formatyearpage`, but a single month has no width to lay out. `HTMLCalendar.formatmonth(theyear, themonth, withyear=True)` takes `withyear` as its third positional, so `width` is forwarded as `withyear`. A falsy value silently drops the year from the month heading:\n\n```python\n>>> import calendar\n>>> b'June 2009' in calendar.HTMLCalendar().formatmonthpage(2009, 6)\nTrue\n>>> b'June 2009' in calendar.HTMLCalendar().formatmonthpage(2009, 6, 0)\nFalse # withyear=0, year dropped\n```\n\nThe argument is meaningless and should be removed. `formatmonthpage` is new in 3.15, which has not shipped a final release yet (latest tag `v3.15.0b3`), so removing the parameter rather than deprecating it is safe.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-153159\n* gh-155932\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/tonghuaroot","@type":"Person","name":"tonghuaroot"},"datePublished":"2026-07-06T04:17:45Z","url":"https://github.com/python/cpython/issues/153158"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bd90f9f6-ca1c-cc07-4709-77c7b527b098 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8468:158DF1:1EF652A:28C87DC:6B0231AE |
| html-safe-nonce | 4113153879dc922ac4313b31ad840da4a9a6aae0b4af544e09f0bc4a6083a59e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDY4OjE1OERGMToxRUY2NTJBOjI4Qzg3REM6NkIwMjMxQUUiLCJ2aXNpdG9yX2lkIjoiNTczMDgzNjkwNTY1MDY5NjYyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7bb144be95af44fbde443d4031e00afa571739ab572251f65824f8b8f5965f11 |
| hovercard-subject-tag | issue:4815904293 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/153158/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9cddd9ca25664729e644b28c83f52eb6c60c4731dea325f9307257c117a70f28/python/cpython/issues/153158 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9cddd9ca25664729e644b28c83f52eb6c60c4731dea325f9307257c117a70f28/python/cpython/issues/153158 |
| og:image:alt | HTMLCalendar.formatmonthpage, added in 3.15, takes a width argument: def formatmonthpage(self, theyear, themonth, width=3, css='calendar.css', encoding=None): ... v.append(self.formatmonth(theyear,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tonghuaroot |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width