Distutils has been removed from the standard library in python 3.12. If you try to install powerplantmatching in a clean environment with python 3.12 right now, you get:
koen-uit-desktop · powerplantmatching > source .venv/bin/activate
(.venv) koen-uit-desktop · powerplantmatching > pip install -e .
[...]
(.venv) koen-uit-desktop · powerplantmatching > python
Python 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 14.0.1 20240217 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import powerplantmatching as pm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/koen/Dokument/UiT/Research/Modelling/powerplantmatching/powerplantmatching/__init__.py", line 38, in <module>
from . import core, data, heuristics, plot, utils
File "/home/koen/Dokument/UiT/Research/Modelling/powerplantmatching/powerplantmatching/data.py", line 25, in <module>
from distutils.log import debug
ModuleNotFoundError: No module named 'distutils'
No problem: the offending line of code is unnecessary anyway as the debug function is never used anywhere!
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Other
Checklist
[x] I have added a note to release notes doc/release_notes.rst.
[x] I have used pre-commit run --all to lint/format/check my contribution
[ ] I have documented the effects of my code changes in the documentation doc/.
[ ] I have adjusted the docstrings in the code appropriately.
A bit silly of me that I didn't submit this PR earlier cause I found the bug a little while ago; could have made it into 0.5.13. Oh well, next release.
Distutils has been removed from the standard library in python 3.12. If you try to install powerplantmatching in a clean environment with python 3.12 right now, you get:
No problem: the offending line of code is unnecessary anyway as the
debug
function is never used anywhere!Type of change
Checklist
doc/release_notes.rst
.pre-commit run --all
to lint/format/check my contributiondoc/
.