dpiparo / vdt

Other
42 stars 18 forks source link

The imp module is removed with Python 3.12 #18

Open dvzrv opened 4 months ago

dvzrv commented 4 months ago

Hi! :wave:

I'm currently looking into projects that still make use of the imp module, as we are about to upgrade to Python 3.12 on Arch Linux.

Unfortunately this project still uses imp, which is removed with Python 3.12:

https://github.com/search?q=repo%3Adpiparo%2Fvdt%20%22import%20imp%22&type=code

It would be great to replace its use with importlib, as otherwise this project will not work on Python 3.12.

Thank you for your work :bow:

dvzrv commented 4 months ago

cc @guitargeek as vdt is required to build https://github.com/root-project/root

cybaol commented 4 months ago

@dvzrv I found that .py files are python2 code(Because the print function doesn't have parentheses. ) and have never been built. It doesn't seem to be causing any damage. Right?

dvzrv commented 4 months ago

You are right, they do not seem to be used by the build targets.

If we call

  rm -v src/vdt.py
  rm -v progs/{{vdtNumpytest,vdtNumpyTime,testExp}.py,{vdtTiming,vdtTest}.ipynb}

the build is still working.

I guess it would be good to either adapt or remove the affected scripts though.