gh-70647: Better promote how to safely parse yearless dates in datetime. by gpshead · Pull Request #116179 · python/cpython · GitHub

github.com

Tin mới

gpshead:docs/datetime/02-29

miss-islington-app

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

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

: Better promote how to safely parse yearless dates in …

awaiting core review

awaiting core review

doctest code within note is bad, dedent.

View reviewed changes

GH-70647: Deprecate strptime day of month parsing without a year present to avoid leap-year bugs #117107

DeprecationWarning on python3.13 lucc/khard#335

Merge branch 'main' into docs/datetime/02-29

Update to match the error message.

needs backport to 3.12

needs backport to 3.12

needs backport to 3.13

needs backport to 3.13

remove no longer referenced footnote

[3.12] gh-70647: update docs to mention the datetime 1900 year default 2/29 issue #131534

ignore the warning in the doctest

View reviewed changes

needs backport to 3.14

needs backport to 3.14

Merge branch 'main' into docs/datetime/02-29

Merge branch 'main' into docs/datetime/02-29

use Petr's suggestion for the docs to hide the warning processing

cover date.strptime (3.14) as well

@github-project-automation

@github-project-automation

: Better promote how to safely parse yearless dates in …

bedevere-app Bot commented Dec 21, 2025

bedevere-app Bot commented Dec 21, 2025

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

: Better promote how to safely parse yearless dates in…

: Better promote how to safely parse yearless dates in …

: Better promote how to safely parse yearless dates in…

: Better promote how to safely parse yearless dates in …

Add failing test for partial date with leap day