Python 3.10 warning: DynamicImporter.find_spec() not found; falling back to find_module()
With Python 3.10.0b1, pygobject emits the following warning:
ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module()
Starting in this release, there will be a concerted effort to begin cleaning up old import semantics that were kept for Python 2.7 compatibility. Specifically, find_loader()/find_module() (superseded by find_spec()), load_module() (superseded by exec_module()), module_repr() (which the import system takes care of for you), the package attribute (superseded by spec.parent), the loader attribute (superseded by spec.loader), and the cached attribute (superseded by spec.cached) will slowly be removed (as well as other classes and methods in importlib). ImportWarning and/or DeprecationWarning will be raised as appropriate to help identify code which needs updating during this transition.