-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: change Timestamp.strptime to raise NotImplementedError #25124
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
Changes from 2 commits
fae65a4
edb629e
8041319
1d74571
2bb6934
cdfe2cc
275c668
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ Bug Fixes | |
|
||
**Timezones** | ||
|
||
- | ||
- Bug in :meth:`Timestamp.strptime` - support %z. (:issue:`21257`) | ||
- | ||
- | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -677,6 +677,18 @@ class Timestamp(_Timestamp): | |
""" | ||
return cls(datetime.fromtimestamp(ts)) | ||
|
||
# Issue 25016. As strptime with %z is not supported in Python 2. | ||
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. We're dropping Python 2 in the next release, so I don't think this comment is needed. |
||
@classmethod | ||
def strptime(cls, date_string, format): | ||
""" | ||
Timestamp.strptime(string, format) | ||
|
||
Function is not implemented as the behavior of datetime.strptime() | ||
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. Instead of this sentence just mention to use |
||
differs in Python 2 and Python 3. | ||
""" | ||
raise NotImplementedError("Timestamp.strptime() is not implmented." | ||
"Use to_datetime() to parse date strings.") | ||
|
||
@classmethod | ||
def combine(cls, date, time): | ||
""" | ||
|
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.
can you move to 0.25.0
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.
also this is now an out-of-date message, put this in api-breaking changes, but change so it reflects the contents of the PR.