Skip to content

Fix PyDateTime_CheckExact checks as proxy for Timestamp checks in cython files #25851

Closed
@ArtificialQualia

Description

@ArtificialQualia

This is a followup to the discussion in #25746.

PyDateTime_CheckExact is being used as a proxy for isinstance(obj, Timestamp) checks for performance reasons. However, if a subclass of the std datetime lib is being used, these checks are not sufficient to determine if an object is a Timestamp or not. Thus a performant replacement must be found.

I have a working fix, but need to do some more performance testing and add proper test cases. If that goes well, I will submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeInternalsRelated to non-user accessible pandas implementation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions