Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e27a0da
refactor npy_datetimestruct_to_datetime
WillAyd Sep 15, 2023
0dea606
Used builtin overflow directives
WillAyd Oct 17, 2023
d6a24f3
macro fixups
WillAyd Oct 17, 2023
21e919c
more macro cleanups
WillAyd Oct 17, 2023
6302f2f
more macro refactor
WillAyd Oct 17, 2023
e2646a6
musllinux c support
WillAyd Oct 18, 2023
5852d20
Merge remote-tracking branch 'upstream/main' into refactor-np-datetime
WillAyd Oct 19, 2023
f55a58a
macro cleanup
WillAyd Oct 19, 2023
057e74f
more refactor
WillAyd Oct 19, 2023
2d6d5fc
fix cython warning
WillAyd Oct 19, 2023
e65e229
windows fix
WillAyd Oct 19, 2023
af29e7c
Raise Outofboundsdatetime
WillAyd Oct 20, 2023
b69b489
Merge remote-tracking branch 'upstream/main' into refactor-np-datetime
WillAyd Oct 20, 2023
f9e5e35
cleanup GIL warnings
WillAyd Oct 20, 2023
1b89dfe
more error handling cleanup
WillAyd Oct 20, 2023
73a1507
updates
WillAyd Oct 20, 2023
ef24509
error message update
WillAyd Oct 20, 2023
2240b09
error fixups
WillAyd Oct 20, 2023
1640002
test fixup
WillAyd Oct 22, 2023
9cdb9c9
clang-format
WillAyd Oct 23, 2023
9e0cec0
Merge branch 'main' into refactor-np-datetime
WillAyd Oct 23, 2023
25f3edf
Merge branch 'main' into refactor-np-datetime
WillAyd Oct 24, 2023
5c09a13
Merge branch 'main' into refactor-np-datetime
WillAyd Oct 26, 2023
4d8696c
updates
WillAyd Oct 26, 2023
b3d5b7c
fixed error message
WillAyd Oct 26, 2023
2f60947
try nogil
WillAyd Oct 26, 2023
f26c924
Merge remote-tracking branch 'upstream/main' into refactor-np-datetime
WillAyd Nov 1, 2023
03315fc
revert offsets changes
WillAyd Nov 1, 2023
b3a80b4
simplified error handling
WillAyd Nov 1, 2023
038db5f
period fixup
WillAyd Nov 1, 2023
df2a4df
fixed test failure
WillAyd Nov 1, 2023
1afb12d
try speedup
WillAyd Nov 1, 2023
e293642
updated benchmark
WillAyd Nov 2, 2023
2203421
Merge remote-tracking branch 'upstream/main' into refactor-np-datetime
WillAyd Nov 2, 2023
7ee90dd
revert noexcepts
WillAyd Nov 3, 2023
81f32a9
Merge remote-tracking branch 'upstream/main' into refactor-np-datetime
WillAyd Nov 3, 2023
8d918dc
Merge branch 'main' into refactor-np-datetime
WillAyd Nov 6, 2023
7e8571f
Merge remote-tracking branch 'upstream/main' into refactor-np-datetime
WillAyd Nov 8, 2023
07e8106
Merge branch 'main' into refactor-np-datetime
WillAyd Nov 10, 2023
eab64ac
shared function for dts formatting
WillAyd Nov 10, 2023
7fbd191
import -> cimport
WillAyd Nov 10, 2023
4eba919
pass address
WillAyd Nov 10, 2023
9e1914d
typo
WillAyd Nov 10, 2023
188eb10
Merge branch 'main' into refactor-np-datetime
WillAyd Nov 13, 2023
162c858
remove comment
WillAyd Nov 14, 2023
de90a2f
cdef object -> str
WillAyd Nov 14, 2023
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
Prev Previous commit
Next Next commit
error message update
  • Loading branch information
WillAyd committed Oct 20, 2023
commit ef245092f3afca26a68e56631a792d3fd6fe0b62
6 changes: 5 additions & 1 deletion pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,11 @@ cdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq) except? -1:
try:
result = npy_datetimestruct_to_datetime(NPY_DATETIMEUNIT.NPY_FR_ns, &dts)
except OverflowError as err:
raise OutOfBoundsDatetime("Out of bounds nanosecond timestamp") from err
# TODO: this is copied from check_dts_bounds, with the thought that
# eventually we can get rid of check_dts_bounds
fmt = (f"{dts.year}-{dts.month:02d}-{dts.day:02d} "
f"{dts.hour:02d}:{dts.min:02d}:{dts.sec:02d}")
raise OutOfBoundsDatetime(f"Out of bounds nanosecond timestamp: {fmt}") from err

return result

Expand Down