Skip to content

Convert more datetime constructors and methods to Argument Clinic #136571

Closed

Description

@serhiy-storchaka

The datetime module was partially converted to Argument Clinic. The following PR converts more functions. This adds signatures for some classes and methods. As a side effect, this may improve performance.

Usually we avoid behavior changes in conversions to Argument Clinic, but there is one such change in the following PR. Currently, fromisocalendar() always raises ValueError for out of range arguments. After conversion, it will raise OverflowError for values that can't fit in the C int. This is a regression. But all other methods that take integer arguments raise OverflowError. It is better to raise ValueError, but this should be consistent for all methods.

Linked PRs

Activity

  1. added 3 commits that reference this issue on Jul 12, 2025
  2. added a commit that references this issue on Aug 9, 2025
  3. added a commit that references this issue on Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions