gh-148663: Document that IllegalMonthError inherits from both ValueError and IndexError#148664
Open
EoinTrial wants to merge 3 commits intopython:mainfrom
Open
gh-148663: Document that IllegalMonthError inherits from both ValueError and IndexError#148664EoinTrial wants to merge 3 commits intopython:mainfrom
EoinTrial wants to merge 3 commits intopython:mainfrom
Conversation
Member
|
58e98ba to
1781682
Compare
Author
|
@picnixz Thanks for taking a look! I've added the |
picnixz
reviewed
Apr 19, 2026
…alueError and IndexError
1781682 to
c4e2753
Compare
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz
approved these changes
Apr 21, 2026
Author
|
@picnixz Thanks very much for reviewing! What's the next step towards getting this merged? :) |
Member
|
I need to come back home so a week or so. In general, once it is approved by one core dev, if the change is minimal, it will be merged when they have time. On your side there is nothing to do (we will ourselves update the branch if necessary/ |
Member
|
There are however some lint issues so could you fix them please? |
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.
The documentation for
calendar.IllegalMonthErrordescribes it only as "a subclass ofValueError", but the source code defines it as:The
IndexErrorbase class is intentional for backwards compatibility (see the source comment inLib/calendar.py), but this is not mentioned in the docs. Users catchingIndexErrorfor bad month numbers won't know their code still works after Python 3.13.calendar.IllegalMonthErrordocs omit IndexError base class #148663📚 Documentation preview 📚: https://cpython-previews--148664.org.readthedocs.build/