swig / swig

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
http://www.swig.org
Other
5.96k stars 1.26k forks source link

fix: support Python 3.14 #3066

Open henryiii opened 5 months ago

henryiii commented 5 months ago

Fix #2967.

I don't remember the exact details of the patch I was using locally, so let's see if this works, can iterate on it if not.

Ah, I didn't realize Python 2 was still supported, I might need to fix a branch for Python 2.

ojwb commented 1 month ago

@henryiii What's still to do here?

Was it CI coverage for 3.14? If that's hard to install in a GHA CI image I think it would be reasonable to merge this knowing that it doesn't break 3.13 and earlier (which we can see from existing CI results) and that we'll get CI testing for 3.14 once it's actually released and packaged by Ubuntu.

ojwb commented 1 month ago

I use https://github.com/actions/setup-python in a different project, and that appears to support 3.14-dev - not sure how easy it would be to fit into SWIG's existing CI configuration though (it would probably need to be used conditionally).

henryiii commented 1 month ago

It wasn’t true when I made the PR, but now there are several ways to get alpha builds.

ojwb commented 3 weeks ago

@henryiii You didn't actually answer the key question though - what's still to do here?

It's still marked as a draft so presumably something (or maybe you forgot to mark it as ready for review?)

henryiii commented 3 weeks ago

It's draft because I didn't have a way to test it. Adding a 3.14 job would finish it off, I think.

henryiii commented 3 weeks ago

I don't know how Python is acquired in CI. setup-python does not seem to be used. I tried just adding a 3.14 to the linux workflow. Edit: it does find Python 3.14, but I think there's an unrelated issue with it.

python_runtime_data_builtin_wrap.cxx:8804:1: error: braces around scalar initializer for type ‘void*’
 8804 | };
      | ^
python_runtime_data_builtin_wrap.cxx:9185:1: error: braces around scalar initializer for type ‘void*’
 9185 | };
      | ^