File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1412,12 +1412,12 @@ class Timestamp(_Timestamp):
1412
1412
try :
1413
1413
return self .to_pydatetime().strftime(format)
1414
1414
except ValueError as err:
1415
- raise ValueError (
1415
+ raise NotImplementedError (
1416
1416
" strftime not yet supported on Timestamps which "
1417
1417
" are outside the range of Python's standard library. "
1418
1418
" For now, please call the components you need (such as `.year` "
1419
1419
" and `.month`) and construct your string from there."
1420
- )
1420
+ ) from err
1421
1421
1422
1422
# Issue 25016.
1423
1423
@classmethod
Original file line number Diff line number Diff line change @@ -1114,5 +1114,5 @@ def test_negative_dates():
1114
1114
"Python's standard library. For now, please call the components you need "
1115
1115
r"\(such as `.year` and `.month`\) and construct your string from there.$"
1116
1116
)
1117
- with pytest .raises (ValueError , match = msg ):
1117
+ with pytest .raises (NotImplementedError , match = msg ):
1118
1118
ts .strftime ("%Y" )
You can’t perform that action at this time.
0 commit comments