Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT: fix a few issues with CPython main/3.13.0a1 #24969

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

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

rgommers
Copy link
Member

@rgommers rgommers commented Oct 20, 2023

Follows up on #24318 (comment). As noted there, numpy still doesn't build, because Cython currently doesn't work with CPython main. But the lseek issue seems like a valid fix anyway (EDIT: due to python/cpython#108783), and the Meson fix can't hurt.

@@ -168,6 +168,9 @@
#define npy_ftell ftell
#endif
#include <sys/types.h>
#ifndef _WIN32
#include <unistd.h>
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, seems like the windows <io.h> equivalence is still in python, I guess. (or maybe I misunderstand).

Anyway, LGTM, thanks. If something is odd on _WIN32 here we would notice it anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

CI failed for 32-bit Python on Windows. I checked in a few other libraries like zlib and blosc, and they all protect this include like that, so it should be fine.

Copy link
Member

Choose a reason for hiding this comment

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

Right, was just waiting for CI, thanks. It seems to me that lseek on windows may need <io.h> but Python probably still has that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Guess we'll find out if and when they clean it up:)

@rgommers rgommers added this to the 2.0.0 release milestone Oct 20, 2023
@seberg seberg merged commit 2c15eb0 into numpy:main Oct 20, 2023
@rgommers rgommers deleted the fix-py313-issues branch October 20, 2023 18:41
charris added a commit that referenced this pull request Nov 6, 2023
Backports of #24969, #24979, #24968, #25068.

* apply 24969.diff

* apply 24979.diff

* apply 24968.diff

* TST: skip flaky test in test_histogram

---------

Co-authored-by: mattip <[email protected]>
charris added a commit to charris/numpy that referenced this pull request Nov 11, 2023
Backports of numpy#24969, numpy#24979, numpy#24968, numpy#25068.

* apply 24969.diff

* apply 24979.diff

* apply 24968.diff

* TST: skip flaky test in test_histogram

---------

Co-authored-by: mattip <[email protected]>
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.

2 participants