-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
MAINT: fix a few issues with CPython main/3.13.0a1 #24969
New issue
Conversation
3a73e13
to
5e562ab
Compare
@@ -168,6 +168,9 @@ | |||
#define npy_ftell ftell | |||
#endif | |||
#include <sys/types.h> | |||
#ifndef _WIN32 | |||
#include <unistd.h> | |||
#endif |
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.
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.
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.
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.
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.
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.
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.
Guess we'll find out if and when they clean it up:)
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 <matti.picus@gmail.com>
Follows up on #24318 (comment). As noted there,
numpy
still doesn't build, because Cython currently doesn't work with CPython main. But thelseek
issue seems like a valid fix anyway (EDIT: due to python/cpython#108783), and the Meson fix can't hurt.