-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-2651: [Python] Fix datetime C API import for PyPy #14539
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW Opening JIRAs ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename pull request title in the following format?
or
See also: |
#ifdef PYPY_VERSION | ||
#include "datetime.h" | ||
#else | ||
#define PyDateTimeAPI ::arrow::py::internal::datetime_api |
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 we keep indentation consistent?
@@ -40,7 +40,11 @@ static Status UnwrapError(PyObject* obj, const char* expected_type) { | |||
} | |||
|
|||
int import_pyarrow() { | |||
#ifdef PYPY_VERSION | |||
PyDateTime_IMPORT; |
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.
Here as well.
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.
Thanks for submitting this. Just two nits.
I see that CI passed on your fork. Failures here are unrelated. |
Thanks! |
Benchmark runs are scheduled for baseline = 1164785 and contender = 2a5c773. 2a5c773 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
As described in the ARROW-2651 issue, this patch fixes the C datetime module import mechanism for PyPy.
This is related to #2089 which was closed in favor of the JIRA issue.