[issue42134] Raise ImportWarning when falling back to find_module()
Brett Cannon
report at bugs.python.org
Thu Apr 8 17:31:25 EDT 2021
Brett Cannon <brett at python.org> added the comment:
> would you accept a PR that changes the changelog entry to contain the ".find_spec() not found; falling back to find_module()" message, for better search-ability?
Sure!
> Also, could you please explain how to migrate to find_spec() in https://docs.python.org/3.10/whatsnew/3.10.html#porting-to-python-3-10 ? I'd do that, but I don't know yet what is the proper way.
The problem is it will possibly vary from class to class. You can probably get pretty far with https://docs.python.org/3/library/importlib.html#importlib.util.spec_from_file_location or https://docs.python.org/3/library/importlib.html#importlib.util.spec_from_loader depending.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42134>
_______________________________________
More information about the Python-bugs-list
mailing list