-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Cython Py2/3 Compatible Imports #23940
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
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0c84dcb
Updated setup
WillAyd 0e90b55
Conversion to absolute imports
WillAyd 62bee57
Missed imports, division, unicode compat
WillAyd 43c8098
Missing import resolution for strptime
WillAyd 385e2da
Timestamp import failure
WillAyd 836f3f2
Merge remote-tracking branch 'upstream/master' into cython-py3-compat
WillAyd 7522818
Reverted non-import changes
WillAyd ea818aa
Reverted floor div changes
WillAyd 1d6d196
LINT fixup
WillAyd 4d0437f
Merge remote-tracking branch 'upstream/master' into cython-py3-compat
WillAyd c78d1a9
Merge remote-tracking branch 'upstream/master' into cython-py3-compat
WillAyd 5d09285
Relative imports in tslibs folder
WillAyd db2acb4
Missed relative imports
WillAyd f25c0d0
Back to absolute
WillAyd 9034cba
Merge remote-tracking branch 'upstream/master' into cython-py3-compat
WillAyd c3bce2f
Merge remote-tracking branch 'upstream/master' into cython-py3-compat
WillAyd 877b3d5
Merge remote-tracking branch 'upstream/master' into cython-py3-compat
WillAyd b908e69
Merge remote-tracking branch 'upstream/master' into cython-py3-compat
WillAyd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,30 +17,28 @@ from cpython.datetime cimport (datetime, tzinfo, | |
PyDateTime_CheckExact, PyDateTime_IMPORT) | ||
PyDateTime_IMPORT | ||
|
||
from ccalendar import DAY_SECONDS, HOUR_SECONDS | ||
|
||
from np_datetime cimport (check_dts_bounds, | ||
npy_datetimestruct, | ||
pandas_datetime_to_datetimestruct, _string_to_dts, | ||
npy_datetime, | ||
dt64_to_dtstruct, dtstruct_to_dt64, | ||
get_datetime64_unit, get_datetime64_value, | ||
pydatetime_to_dt64, NPY_DATETIMEUNIT, NPY_FR_ns) | ||
from np_datetime import OutOfBoundsDatetime | ||
|
||
from util cimport (is_string_object, | ||
is_datetime64_object, | ||
is_integer_object, is_float_object) | ||
|
||
from timedeltas cimport cast_from_unit | ||
from timezones cimport (is_utc, is_tzlocal, is_fixed_offset, | ||
from .ccalendar import DAY_SECONDS, HOUR_SECONDS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are some of these relative? I think this is very confusing, I would rather have all absolute imports as we do elsewhere. |
||
|
||
from .np_datetime cimport ( | ||
check_dts_bounds, npy_datetimestruct, pandas_datetime_to_datetimestruct, | ||
_string_to_dts, npy_datetime, dt64_to_dtstruct, dtstruct_to_dt64, | ||
get_datetime64_unit, get_datetime64_value, pydatetime_to_dt64, | ||
NPY_DATETIMEUNIT, NPY_FR_ns) | ||
from .np_datetime import OutOfBoundsDatetime | ||
|
||
from .util cimport (is_string_object, | ||
is_datetime64_object, | ||
is_integer_object, is_float_object) | ||
|
||
from .timedeltas cimport cast_from_unit | ||
from .timezones cimport (is_utc, is_tzlocal, is_fixed_offset, | ||
get_utcoffset, get_dst_info, | ||
get_timezone, maybe_get_tz, tz_compare) | ||
from timezones import UTC | ||
from parsing import parse_datetime_string | ||
from .timezones import UTC | ||
from .parsing import parse_datetime_string | ||
|
||
from nattype import nat_strings | ||
from nattype cimport NPY_NAT, checknull_with_nat, c_NaT as NaT | ||
from .nattype import nat_strings | ||
from .nattype cimport NPY_NAT, checknull_with_nat, c_NaT as NaT | ||
|
||
# ---------------------------------------------------------------------- | ||
# Constants | ||
|
@@ -1091,7 +1089,7 @@ cdef inline Py_ssize_t bisect_right_i8(int64_t *data, | |
|
||
cdef inline str _render_tstamp(int64_t val): | ||
""" Helper function to render exception messages""" | ||
from timestamps import Timestamp | ||
from pandas._libs.tslibs.timestamps import Timestamp | ||
return str(Timestamp(val)) | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not change this one?