openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Migrate to Python 3.14 and drop Python 3.11

Open MicahGale opened this issue 2 months ago • 4 comments

Description

This adds support for python 3.14 and drops support for python 3.11 per SPEC 0. Note: per SPEC 0 this should only be shipped with a minor release and not a patch release.

This mostly updates the pyproject metadata, and tests against python 3.14. There is also a question about free threading. I handled this by adding python 3.13 and 3.14 free-threading to the test matrix. Not sure if I did so in the most effective way.

Note: the 3.11 tests will need to dropped from the branch protection rules as required runs.

Somewhat related to #2731, #3164.

Fixes #3641

Checklist

  • [ ] I have performed a self-review of my own code
  • [x] I have run clang-format (version 15) on any C++ source files (if applicable)
  • [x] I have followed the style guidelines for Python source files (if applicable)
  • [x] I have made corresponding changes to the documentation (if applicable)
  • [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)

MicahGale avatar Nov 18 '25 15:11 MicahGale

As vtk is an optional dependency perhaps it is ok to proceed with the python 3.14 even though vtk is not available?

If so we could add a vtk on or off flag to the CI options and get 3.14 passing without vtk and perhaps 3.13 passing with vtk just to ensure things do work with vtk but not let this block the progress of getting openmc working with 3.14

shimwell avatar Nov 19 '25 14:11 shimwell

If so we could add a vtk on or off flag to the CI options and get 3.14 passing without vtk and perhaps 3.13 passing with vtk just to ensure things do work with vtk but not let this block the progress of getting openmc working with 3.14

That's a good point, but it is still officially supported. I'm worried that circumventing vtk to get this out faster will just be more work. From python 3.13 I don't expect really any issues to arise in the testing phase.

MicahGale avatar Nov 19 '25 15:11 MicahGale

h5py has made nice progress on python 3.14t https://github.com/h5py/h5py/pull/2702 I think the CI didn't get as far as trying to install this package but it would currently fail to find py3.14t h5py on pypi

shimwell avatar Nov 20 '25 10:11 shimwell

This brings up a great question of if we should deploy 3.14 without 3.14t being supported. Let's wait to see what happens with vtk, but I think it would be better to deploy 3.14 rather than wait on 3.14t.

MicahGale avatar Nov 20 '25 15:11 MicahGale