gh-153158: Remove the erroneous width argument of HTMLCalendar.formatmonthpage#153159
Open
tonghuaroot wants to merge 2 commits into
Open
gh-153158: Remove the erroneous width argument of HTMLCalendar.formatmonthpage#153159tonghuaroot wants to merge 2 commits into
tonghuaroot wants to merge 2 commits into
Conversation
…formatmonthpage The argument is a meaningless copy-paste from formatyearpage; a single month has no width. formatmonthpage is new in 3.15 (currently unreleased at 3.15.0b3), so remove it rather than keep a broken argument.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
HTMLCalendar.formatmonthpagewas added in 3.15 with awidthargument copied fromformatyearpage. A single month has no width to lay out, andHTMLCalendar.formatmonth's third positional iswithyear, sowidthwas silently forwarded aswithyear. A falsy value dropped the year from the month heading:This removes the parameter. The default output is unchanged.
formatmonthpageis new in 3.15, which has not shipped a final release (latest tagv3.15.0b3), so removing it rather than deprecating it is safe; this should be backported to 3.15 only.Note: dropping the parameter also means
formatmonthpage(y, m, 3)now passes3tocssrather than the (bogus)width.formatmonthpageis currently undocumented inDoc/library/calendar.rst; adding a doc entry is a separate follow-up.I have left the backport label for a maintainer to assign.