Closed
Description
Crash report
What happened?
Python terminates with core dumped on the following test:
import datetime
y = datetime.datetime.fromisoformat('0000W25')
print(y)
The test result:
python: ./Modules/_datetimemodule.c:290: days_before_year: Assertion `year >= 1' failed.
Aborted (core dumped)
The issue happened due to lack of checking for input parameters in iso_to_ymd().
The 'iso_year' input parameter should be checked to fix the issue.
CPython versions tested on:
3.11, 3.12, CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0a5+ (heads/main:dc54714044, Apr 4 2024, 12:28:42) [GCC 11.4.0]
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Done