Skip to content
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

Merged
merged 2 commits into from
Oct 31, 2022
Merged

ARROW-2651: [Python] Fix datetime C API import for PyPy #14539

merged 2 commits into from
Oct 31, 2022

Conversation

mattip
Copy link
Contributor

@mattip mattip commented Oct 28, 2022

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.

@github-actions
Copy link

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?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@mattip mattip changed the title patch python DateTime initialization for PyPy ARROW-2651: [Python] patch datetime C-api for PyPy Oct 28, 2022
@github-actions
Copy link

#ifdef PYPY_VERSION
#include "datetime.h"
#else
#define PyDateTimeAPI ::arrow::py::internal::datetime_api
Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well.

Copy link
Member

@pitrou pitrou left a 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.

@pitrou pitrou changed the title ARROW-2651: [Python] patch datetime C-api for PyPy ARROW-2651: [Python] Fix datetime C API import for PyPy Oct 31, 2022
@pitrou
Copy link
Member

pitrou commented Oct 31, 2022

I see that CI passed on your fork. Failures here are unrelated.

@pitrou pitrou merged commit 2a5c773 into apache:master Oct 31, 2022
@mattip
Copy link
Contributor Author

mattip commented Oct 31, 2022

Thanks!

@ursabot
Copy link

ursabot commented Nov 1, 2022

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.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.0% ⬆️0.0%] test-mac-arm
[Finished ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.57% ⬆️0.11%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 2a5c7736 ec2-t3-xlarge-us-east-2
[Failed] 2a5c7736 test-mac-arm
[Finished] 2a5c7736 ursa-i9-9960x
[Finished] 2a5c7736 ursa-thinkcentre-m75q
[Finished] 11647857 ec2-t3-xlarge-us-east-2
[Failed] 11647857 test-mac-arm
[Finished] 11647857 ursa-i9-9960x
[Finished] 11647857 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants