MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
294 stars 181 forks source link

Python API: Support Python 3.12 #2957

Closed Lestropie closed 3 months ago

Lestropie commented 3 months ago

This should unblock CI tests on dev.

The newly-used "pathlib" module prior to Python 3.12 utilises the __new__() function to initialise member variables; Python 3.12 more suitably uses __init__().

I wasn't able to figure out a cleaner syntax that would work with both versions.

While we had some prior discussion about the use of composition rather than inheritance, here that composition would consist almost exclusively of pass-throughs. So I'm going to stick with the multi-inheritance strategy, at least for now. I might do some re-arrangement to allow developers to construct fstring-quote-escaped filesystem paths outside of the CLI, but I'll defer that until after CI on dev is unblocked.

github-actions[bot] commented 3 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 3 months ago

clang-tidy review says "All clean, LGTM! :+1:"