Reloading pycode from a custom user_pycode_path
fails in Python 3.9 due to missing importlib.util
import
#499
Labels
user_pycode_path
fails in Python 3.9 due to missing importlib.util
import
#499
Describe the bug
It looks like it was a bug that one could import
import importlib
directly andimportlib.util
was exported as a part of it directly. In Python 3.10, this behavior was changed, which causes anAttributeError
on the second loading of the pycode from a customuser_pycode_path
:See https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641/7 for more context
To Reproduce
Steps to reproduce the behavior:
Assuming
andes_pycode_path_bug.py
:Then run the following reproduction steps assuming bash:
Doing the same thing assuming
python=3.8
does not fail and successfully loads. It looks like a python patch version in 3.9 is the version that this breaks on, but I did not find the specific patch it broke on.Expected behavior
I'd expect the pycode from the user-specified path to load successfully on all subsequent loads.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
andes
)**pip packages (please paste the output from
pip list
)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: