PyPSA / powerplantmatching

Set of tools to combine multiple power plant databases
https://powerplantmatching.readthedocs.io/en/latest/
GNU General Public License v3.0
152 stars 52 forks source link

Remove disused reference to distutils.debug #159

Closed koen-vg closed 4 months ago

koen-vg commented 4 months ago

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

Checklist

koen-vg commented 4 months ago

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.

fneum commented 4 months ago

No problem, I'll just do another one.