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 — Add Python 3.15 calendar datetime and difflib updates by JelleZijlstra · Pull Request #15729 · python/typeshed

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Python 3.15 calendar additions for standalone month names and HTMLCalendar.formatmonthpage.
  • Update renamed 3.15 datetime ISO/strptime positional-only parameters, including datetime.fromisoformat.
  • Add difflib.unified_diff(color=...).
  • Remove corresponding 3.15 stubtest allowlist entries.

Relevant report entries

  • Added calendar.standalone_month_name, calendar.standalone_month_abbr, and HTMLCalendar.formatmonthpage() (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Lib/calendar.py)
  • Renamed datetime ISO/strptime positional-only parameters to string (CPython source: https://github.com/python/cpython/blob/e81025e6d2e01e38c5a5b656af5739ac9df5ff55/Modules/_datetimemodule.c)
  • Added difflib.unified_diff(color=...) (CPython PR: gh-133722: Add Difflib theme to _colorize and 'color' option to difflib.unified_diff cpython#133725; source: https://github.com/python/cpython/blob/main/Lib/difflib.py)

Sorry, something went wrong.

Uh oh!

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

All reactions
@JelleZijlstra
Add Python 3.15 calendar datetime and difflib updates
a631519
@github-actions

This comment has been minimized.

Sign in to view
JelleZijlstra added 2 commits May 8, 2026 13:01
@JelleZijlstra
Guard datetime 3.15 parameter names
5b9fc3d
@JelleZijlstra
Merge remote-tracking branch 'upstream/main' into codex/python315-cal…
b9e4d3e
…endar-difflib

# Conflicts:
#	stdlib/@tests/stubtest_allowlists/py315.txt
@JelleZijlstra
JelleZijlstra marked this pull request as ready for review May 8, 2026 20:05
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

All reactions

Sorry, something went wrong.

Uh oh!

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

srittau
srittau approved these changes May 8, 2026
View reviewed changes
Comment thread stdlib/calendar.pyi
Comment on lines +224 to +225
standalone_month_name: Sequence[str]
standalone_month_abbr: Sequence[str]

@srittau srittau May 8, 2026

Copy link
Copy Markdown
Collaborator

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.

The situation here is more complicated. There are instances of _localized_month, which isn't a full Sequence, but has other format field. Same actually for month_name and month_abbr. day_name and day_abbr are not instances of _localized_day. But the latter has been true since at least 3.10, so I'm fine with using Sequence in this PR, although I would prepare a followup, changing these fields.

Another thing I noticed, although that's probably legacy and possibly also out of scope: Through __getattr__, this module has two constants "January" (equaling 1), and "February" (equaling 2).

Sorry, something went wrong.

Uh oh!

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

All reactions

@JelleZijlstra JelleZijlstra May 8, 2026

Copy link
Copy Markdown
Member Author

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.

Thanks, I'll prepare a followup for this.

Regarding the __getattr__, seems better to keep those out of the stub unless someone really needs them.

Sorry, something went wrong.

Uh oh!

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

srittau reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@JelleZijlstra
JelleZijlstra merged commit f74b24b into python:main May 8, 2026
56 checks passed

Uh oh!

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

@JelleZijlstra
JelleZijlstra deleted the codex/python315-calendar-difflib branch May 8, 2026 20:31
@JelleZijlstra JelleZijlstra mentioned this pull request May 9, 2026
calendar: fix day_name etc. type #15738
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@srittau srittau srittau approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@JelleZijlstra @srittau
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.