otsaloma / gaupol

Editor for text-based subtitle files
https://otsaloma.io/gaupol/
GNU General Public License v3.0
247 stars 35 forks source link

DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12 #227

Closed sbraz closed 2 weeks ago

sbraz commented 3 weeks ago
gaupol/test/test_extensionman.py::TestExtensionManager::test___init__
gaupol/test/test_extensionman.py::TestExtensionManager::test_setup_extension
gaupol/test/test_extensionman.py::TestExtensionManager::test_teardown_extension
  <frozen importlib._bootstrap>:530: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

This one seems to stem from https://github.com/otsaloma/gaupol/blob/29b0195ae9028c49a1465884af979093ae167789/gaupol/extensionman.py#L126

otsaloma commented 3 weeks ago

python3.12 -m pytest . passes fully for me, so maybe not a problem in 3.12 yet?

Should be fixed of course.

sbraz commented 3 weeks ago

It does for me too with 3.13, I have no idea why it says that. The documentation, even that for 3.14 doesn't mention when it will be removed: https://docs.python.org/3.14/library/importlib.html#importlib.abc.Loader.load_module