Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The imp module is removed with Python 3.12 #18

Open
dvzrv opened this issue Feb 26, 2024 · 3 comments
Open

The imp module is removed with Python 3.12 #18

dvzrv opened this issue Feb 26, 2024 · 3 comments

Comments

@dvzrv
Copy link

dvzrv commented Feb 26, 2024

Hi! 👋

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 🙇

@dvzrv
Copy link
Author

dvzrv commented Feb 27, 2024

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

@cybaol
Copy link

cybaol commented Mar 1, 2024

@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
Copy link
Author

dvzrv commented Mar 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants