Skip to content

assertion when checking MINYEAR #166

@a-detiste

Description

@a-detiste

Hi,

I had to use to use this patch to build new version for Debian

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1098593

test_parse_auto_generated_invalid_formats (tests.tests.InvalidTimestampTestCase.test_parse_auto_generated_invalid_formats) ... python3.13: isocalendar.c:128: days_before_year: Assertion `year >= 1' failed.
Aborted

--- a/module.c
+++ b/module.c
@@ -209,7 +209,7 @@
     /* Year */
     PARSE_INTEGER(year, 4, "year")
 
-#if !PY_VERSION_AT_LEAST_36
+#if 1
     /* Python 3.6+ does this validation as part of datetime's C API
      * constructor. See
      * https://github.com/python/cpython/commit/b67f0967386a9c9041166d2bbe0a421bd81e10bc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions