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 — gh-148663: Document that IllegalMonthError inherits from both ValueError and IndexError by EoinTrial · Pull Request #148664 · python/cpython

Conversation

@EoinTrial

@EoinTrial EoinTrial commented Apr 17, 2026 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

The documentation for calendar.IllegalMonthError describes it only as "a subclass of ValueError", but the source code defines it as:

class IllegalMonthError(ValueError, IndexError):

The IndexError base class is intentional for backwards compatibility (see the source comment in Lib/calendar.py), but this is not mentioned in the docs. Users catching IndexError for bad month numbers won't know their code still works after Python 3.13.

  • Issue: calendar.IllegalMonthError docs omit IndexError base class #148663

📚 Documentation preview 📚: https://cpython-previews--148664.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@python-cla-bot

python-cla-bot Bot commented Apr 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting review docs Documentation in the Doc dir labels Apr 17, 2026
@github-project-automation github-project-automation Bot added this to Docs PRs Apr 17, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Apr 17, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 17, 2026
calendar.IllegalMonthError docs omit IndexError base class #148663
Closed
@picnixz

picnixz commented Apr 19, 2026

Copy link
Copy Markdown
Member
  1. Can you add a versionchanged directive indicating that this is now inheriting ValuerError and IndexError since 3.13 (I did not check when it was changed so pick the correct version).
  2. Reword the NEWS entry
  3. Add a test to ensure that we do not remove that double inheritance.
EoinTrial reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@EoinTrial
EoinTrial force-pushed the fix/calendar-illegalmontherror-docs branch from 58e98ba to 1781682 Compare April 19, 2026 14:32
@EoinTrial
EoinTrial requested a review from AA-Turner as a code owner April 19, 2026 14:32
@EoinTrial

EoinTrial commented Apr 19, 2026

Copy link
Copy Markdown
Contributor Author

@picnixz Thanks for taking a look! I've added the versionchanged:: 3.12 directive, rewritten the NEWS entry, and added test_illegal_month_error_bases to verify the dual inheritance.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

picnixz
picnixz reviewed Apr 19, 2026
View reviewed changes
Comment thread Doc/library/calendar.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/calendar.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/calendar.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_calendar.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@EoinTrial
pythongh-148663: Document that IllegalMonthError inherits from both V…
c4e2753
…alueError and IndexError
@EoinTrial
EoinTrial force-pushed the fix/calendar-illegalmontherror-docs branch from 1781682 to c4e2753 Compare April 19, 2026 16:46
@EoinTrial @picnixz
Apply suggestions from code review
bd3bfd1
Co-authored-by: Bénédikt Tran <[email protected]>
@EoinTrial
EoinTrial requested a review from picnixz April 19, 2026 16:48
picnixz
picnixz approved these changes Apr 21, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Apr 21, 2026
@EoinTrial

EoinTrial commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

@picnixz Thanks very much for reviewing! What's the next step towards getting this merged? :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Apr 21, 2026

Copy link
Copy Markdown
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/

EoinTrial reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Apr 21, 2026

Copy link
Copy Markdown
Member

There are however some lint issues so could you fix them please?

EoinTrial reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@EoinTrial
pythongh-148664: fix trailing whitespace in test_calendar.py
85858bc
StanFromIreland
StanFromIreland reviewed Apr 22, 2026
View reviewed changes
Comment thread Misc/NEWS.d/next/Documentation/2026-04-17-02-28-55.gh-issue-148663.MHIbRB.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed Apr 22, 2026
View reviewed changes
Comment thread Doc/library/calendar.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@EoinTrial @StanFromIreland
Apply suggestions from code review
59a8de3
Co-authored-by: Stan Ulbrych <[email protected]>
@EoinTrial
EoinTrial requested a review from StanFromIreland April 22, 2026 22:31
StanFromIreland
StanFromIreland approved these changes Apr 23, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

EoinTrial reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@StanFromIreland StanFromIreland added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Apr 23, 2026
@StanFromIreland
StanFromIreland merged commit 435be06 into python:main Apr 23, 2026
51 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Apr 23, 2026
@miss-islington-app

miss-islington-app Bot commented Apr 23, 2026

Copy link
Copy Markdown

Thanks @EoinTrial for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 23, 2026
@bedevere-app

bedevere-app Bot commented Apr 23, 2026

Copy link
Copy Markdown

GH-148917 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Apr 23, 2026
@bedevere-app

bedevere-app Bot commented Apr 23, 2026

Copy link
Copy Markdown

GH-148918 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Apr 23, 2026
@StanFromIreland

StanFromIreland commented Apr 23, 2026

Copy link
Copy Markdown
Member

Merged, GRMA!

EoinTrial reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@EoinTrial
EoinTrial deleted the fix/calendar-illegalmontherror-docs branch April 23, 2026 16:41
@EoinTrial

EoinTrial commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

@StanFromIreland Tá fáilte mhór romhat, a chara ;)

StanFromIreland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@EoinTrial @picnixz
@StanFromIreland @ljfp
pythongh-148663: Document that calendar.IllegalMonthError inherits …
00416ea
…from both `ValueError` and `IndexError` (python#148664)

Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
StanFromIreland added a commit that referenced this pull request Apr 27, 2026
@miss-islington @EoinTrial
@picnixz @StanFromIreland
[3.14] gh-148663: Document that calendar.IllegalMonthError inherits…
2459faa
… from both `ValueError` and `IndexError` (GH-148664) (#148917)

(cherry picked from commit 435be06)

Co-authored-by: Eoin Shaughnessy <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
StanFromIreland added a commit that referenced this pull request May 3, 2026
@miss-islington @EoinTrial
@picnixz @StanFromIreland
[3.13] gh-148663: Document that calendar.IllegalMonthError inherits…
6a2f12b
… from both `ValueError` and `IndexError` (GH-148664) (#148918)

(cherry picked from commit 435be06)

Co-authored-by: Eoin Shaughnessy <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz approved these changes
@StanFromIreland StanFromIreland StanFromIreland approved these changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir

Projects

Docs PRs
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@EoinTrial @picnixz @StanFromIreland
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.
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.