DIAGNijmegen / rse-panimg

Conversion of medical images to MHA and TIFF.
Apache License 2.0
13 stars 5 forks source link

Update supported Python versions #91

Closed jmsmkn closed 1 year ago

jmsmkn commented 1 year ago

Removes support for Python 3.7 and adds support for Python 3.11.

jmsmkn commented 1 year ago

It seems that https://github.com/pydicom/pylibjpeg-openjpeg does not support Python 3.11 yet.

jmsmkn commented 1 year ago

It seems that https://github.com/pydicom/pylibjpeg-openjpeg does not support Python 3.11 yet.

PR here: https://github.com/pydicom/pylibjpeg-openjpeg/pull/58

jmsmkn commented 1 year ago

Same goes for https://github.com/pydicom/pylibjpeg-libjpeg

jmsmkn commented 1 year ago

Same goes for https://github.com/pydicom/pylibjpeg-libjpeg

Two candidates for support there, completely missed the existing PR 🤦‍♂️ Time for the weekend.

https://github.com/pydicom/pylibjpeg-libjpeg/pull/45 (closed for 44) https://github.com/pydicom/pylibjpeg-libjpeg/pull/44 (almost complete)

jmsmkn commented 1 year ago

Support for Python 3.11 has been released in https://pypi.org/project/pylibjpeg-openjpeg/1.3.2/

jmsmkn commented 1 year ago

The dependencies now install but we get some seemingly genuine test errors for tiff files on Python 3.11.

jmsmkn commented 1 year ago

@miriam-groeneveld could you see a reason for tiff reading being broken with Python 3.11?

miriam-groeneveld commented 1 year ago

Not really, I'll have a look

miriam-groeneveld commented 1 year ago

It's a change in python 3.11 how enums are stringified, see here

str(AnIntEnum.ONE) and format(AnIntEnum.ONE) return '1', whereas before str(AnIntEnum.ONE) returned 'AnIntEnum.ONE'

I'll fix it.

miriam-groeneveld commented 1 year ago

Thanks for fixing, I created a branch with the tiff fix, but the builds failed and I got distracted with Windows issues

jmsmkn commented 1 year ago

Thanks for fixing, I created a branch with the tiff fix, but the builds failed and I got distracted with Windows issues

Yes I saw, needed to crack on, thanks for the pointer about what was wrong!