-
Notifications
You must be signed in to change notification settings - Fork 18
Combine all python/numpy support PRs, set minimum python version to 3.6 #43
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
base: master
Are you sure you want to change the base?
Conversation
Update CI for debian 11-13
…nd NPY_CARRAY_RO being unavailable in newer versions of numpy.
zhangt58
left a comment
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.
Running OK in Debian 13.
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.
I chose to make a single cast in dbfield.c:
PyArrayObject * array = (PyArrayObject *)arr;
and pass that to functions - rather than have multiple casts where these are applied.
I does not make any practical difference, but I wondered if there's a reason for not doing so?
|
I can report that based on commit 5993a6c (latest commit on the branch) I was able to build the module successfully in our build enviornment for:
(but I have not tested "using" it) |
|
Thanks all for the review. @pheest I changed to the single cast since I agree that is better. We have tested with rocky 8 and rocky 9 and numpy 1.26.4 and numpy 2.0.2 |
|
After reviewing dbfield.c, I fixed some potential memleak due to not calling [X]DECREF. |
I do not believe this is a leak. In fact, I think your change would introduce a double decrement on error. Error handling with The internal call stack I am looking at is: In
Once into |
|
As a rule, python C api functions like |
Looks like this goes back to numpy 1.23. So not as far back as I first thought. |
- PyArray_FromAny handles the refcnt of descr.
Calling |
|
Thanks @mdavidsaver and @zhangt58 ! |
|
@tynanford, it looks good to me, thanks. |
Branches off of #40 with @zhangt58 's changes. It will be easier to work on a branch in pyDevSup than off of Han's branch.
@pheest and I had a chat this morning and the outcome is we hope to work off this branch and get it merged to support the targeted python, OS, and numpy versions. python support is planned to be py >= 3.6
There are a few items still TBD