Closed Donavin97 closed 5 months ago
According to the documentation importlib
has been introduced with Python 3.1, see https://docs.python.org/3/library/importlib.html. I think that it won't break any installation as we are requiring Python 3 and I don't think that any distribution ships with Python 3.0. We will check. Thank you for the fix.
The minimum required Python version is 3.6.8.
Now I am realising that we are in the seedlink repo. In seiscomp-control.py
we have been using importlib
for quite some time. Wouldn't the change boild down to
-- mod = imp.new_module(modname)
++ mod = importlib.import_module(modname)
?
Hi there Jan. I pushed the change that you suggested. Thanks everyone. Now SeisComP is working perfectly in python 3.12.
Thanks a lot, Donavin!
Let's merge then. Thanks @Donavin97.
@Donavin97, I have tested this again and actually your initial commit was correct. The revised version is just wrong as the module does not exist on the filesystem and your initial approach was absolutely correct. I will revert the revised commit to make it work again.
Hi Jan, Thanks for your feedback and for taking the time to test my contribution. Everything is good with me. Go ahead and revert back to the initial commit. I will keep testing on my end as well. Regards: Donavin On Tue, May 07, 2024 at 01:55:22AM -0700, Jan Becker wrote:
@Donavin97, I have tested this again and actually your initial commit was correct. The revised version is just wrong as the modules does not exist on the filesystem and your initial approach was absolutely correct. I will revert the revised commit to make it work again.
-- Reply to this email directly or view it on GitHub: https://github.com/SeisComP/seedlink/pull/15#issuecomment-2097789243 You are receiving this because you were mentioned.
Message ID: @.***>
Good day everyone. I am making another PR to fix an issue where the 'imp' module was removed from python 3.12. This fix uses the 'importlib' module to handle the creation of dynamic modules within the seedlink namespace. This should work for all python 3.x versions, although it has only been tested on python3.12. thanks.