Skip to content

CLN: Use C-API for datetime.date #33222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/strptime.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import time
import locale
import calendar
import re
import datetime
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think can just cimport cpython.datetime as datetime to minimize changes no? Didn't we move away from the import pattern here already in #32459

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Somehow slipped away from me


from _thread import allocate_lock as _thread_allocate_lock

Expand All @@ -13,6 +12,7 @@ import pytz
import numpy as np
from numpy cimport int64_t

cimport cpython.datetime as datetime

from pandas._libs.tslibs.np_datetime cimport (
check_dts_bounds, dtstruct_to_dt64, npy_datetimestruct)
Expand Down