GH-70647: Deprecate strptime day of month parsing without a year present to avoid leap-year bugs by gpshead · Pull Request #117107 · python/cpython · GitHub

github.com

Tin mới

gpshead:leapyear/be/gone

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

gh-70647: Better promote how to safely parse yearless dates in datetime. #116179

datetime.strptime without a year fails on Feb 29 #70647

Deprecate strptime leap-year ambiguous MM-DD parsing.

Fix the stacklevel and remove example from the warning message.

awaiting core review

View reviewed changes

Learn more about hiding disruptive comments

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

Simplify _assertNotWarns error message, removing a typo.

add a unittest for _assertNotWarns.

Document the behavior deprecation.

minor doc cleanup.

adjust example code comments.

View reviewed changes

View reviewed changes

nice job with the time machine

Looks like this would be the first use of skip_file_prefixes in the stdlib.

Use skip_file_prefixes for the warning

: Deprecate strptime day of month parsing without a yea…

gh-137742: Use footnote markup for table notes in datetime docs #137743