Skip to content

Conversation

@jeonghanlee
Copy link
Contributor

@jeonghanlee jeonghanlee commented Sep 1, 2024

@mdavidsaver @tynanford

As you know, I don't know the Python and I hate the Python. Somehow, our environment still needs it, so I would like to at least fix these compatibility issues and compile errors.

Please understand that this is my naive attempt to fix the following problems:

Issue: #35

The current PR contains the exact same code which Tynan proposed.

Issue: #37 and PR : #39

The current PR contains my proposal code with a code proposal from PR 39.

Debian 13 GCC compiling error

../dbapi.c:296:5: error: initialization of 'PyMethodDef *' from incompatible pointer type 'struct PyMethodDef (*)[8]' [-Wincompatible-pointer-types]
  296 |     &dbapimethod
      |     ^
../dbapi.c:296:5: note: (near initialization for 'dbapimodule.m_methods')

After the error, I looked through PyMethodDef examples >= Python Version 3 at https://docs.python.org/3.12/extending/extending.html#compilation-and-linkage
Then, I suspect that the original code was not correct. Am I right?
I followed all examples from Python documentation from 3 to 3.12. Then I can compile the code with gcc (Debian 14.2.0-3) 14.2.0. Is this something, the previous gcc cannot find? Or do I something wrong here?

I need your testing and feedback so we can fix these problems together.

@jeonghanlee jeonghanlee changed the title Make the module compiliable with Debian 13 Making the module compileable with Debian 13 Sep 1, 2024
@tynanford
Copy link
Collaborator

I need your testing and feedback so we can fix these problems together.

Very late to the party but I've been using this PR in my Rocky 9 EPICS builds and it works well.

@jeonghanlee
Copy link
Contributor Author

We have removed module support from EPICS-env v1.1.2. It is now available in the legacy support repository: https://github.com/jeonghanlee/EPICS-legacy-support

I am closing this pull request and will continue the work on my fork until this module support is officially phased out.

@jeonghanlee jeonghanlee reopened this Oct 1, 2025
@jeonghanlee
Copy link
Contributor Author

@tynanford I re-opened it.

Update CI for debian 11-13
@tynanford
Copy link
Collaborator

I believe this is ready to merge. The changes make pyDevSup compatible with numpy v1 and v2. Also compatible with newer versions of python.

The ci scripts submodule was updated to the latest commit and the CI jobs were expanded to test python 3.6 - 3.13

@tynanford
Copy link
Collaborator

@pheest I see you already found and fixed the removal of NPY_CARRAY and NPY_CARRAY_RO in numpy 2 - fc9d696

If that solution works for numpy 1 and 2 then that looks better than what I did.

Also your windows PR #33 and this PR are crossing paths a bit. Any thoughts on how best to go about this? My proposal would be to split the task of fixing python/numpy support from the task of adding windows support but curious what you think

@pheest
Copy link
Collaborator

pheest commented Oct 3, 2025

I can confirm I have it working and tested for Python versions 3.6 (numpy==1.19.5) to 3.13 (numpy==2.3.3).
I haven't looked at this PR yet, but will aim to do so.

We should probably have a chat about this; I will send you a mail.

Copy link
Collaborator

@zhangt58 zhangt58 left a comment

Choose a reason for hiding this comment

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

Tested in Debian 13, and found a few issues regarding the explicit type casting in dbfield.c, please see the patch attached:
0001-FIX-Cast-to-PyArrayObject-warning-of-comparsion-inte.patch

The ci scripts might also needs to be updated, Debian 13 is using gcc 14.

@zhangt58
Copy link
Collaborator

zhangt58 commented Oct 5, 2025

I tried to push my commits with a new branch to this repo, but failed, see #42, I'm not sure how to fix it.

@zhangt58
Copy link
Collaborator

zhangt58 commented Oct 5, 2025

I tried to push my commits with a new branch to this repo, but failed, see #42, I'm not sure how to fix it.

Now I pushed the changes, see see 44a16fd

@tynanford
Copy link
Collaborator

Thanks @zhangt58 ! I've created a PR on your branch since that will be easier to work with. Closing this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants