Should it be recoginzed that import in the method "__find__"

Just try PEP810, I make it combine with my project “friendly_module_not_found_error”. In this case, is the note “Don’t import any modules in the method ‘__find__’” in ModuleNotFoundError right?

>>> import sys
>>> lazy import art
>>> class WrongHook:
...     def find_spec(*args, **kwargs):...
...     def __find__(self, name=None): return art.a
...
>>> a = WrongHook()
>>> sys.meta_path.append(a)
>>> art
Traceback (most recent call last):
  File "<python-input-12>", line 1, in <module>
    lazy import art
ImportError: deferred import of 'art' raised an exception during resolution

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<python-input-16>", line 1, in <module>
    art
ModuleNotFoundError: No module named 'art'. Did you mean: 'ast'?

ImportError found in 'WrongHook.__find__' module '__main__':
  File "<python-input-13>", line 3, in __find__

Don't import any modules in the method '__find__'

Yes, this is correct. An import is happening during __find__. That it happened because of a lazy import is not relevant.

If you are writing import hooks, you need to be careful with how you are using the import machinery. This has always been the case, lazy imports just add a new edge case. For such a niche topic as custom import hooks this is acceptable.

However, it does add another wrench in the plans to have global lazy imports.