I'd like to disagree with the "dynamic import hook problem" doesn't need to
be solved. I believe the reason why they are not popular today is that
static check tools/IDEs don't support it well and therefore discourage
users from adopting them. However, if we start adding dynamic import hooks
for every editable installation for every project the need for handling
them correctly would significantly increase and also comments on those
issue trackers would jump up. If possible I'd like to at least explore how
we can solve the dynamic import hooks. We might conclude that's not
feasible or desirable. Nevertheless. then we can at least have good
reasoning on what are the obstacles in achieving this are.
Bernat
On Wed, Apr 20, 2022 at 6:06 PM Eric Traut
Static analysis tools cannot handle those cases automatically. These scenarios require manual configuration on the part of the user. Thankfully, such dynamic hooks are rarely used in practice — perhaps in part because they don't work well with development tools. Pylance has over 4M active users, and we've received only a couple of questions over the past three years involving dynamic import hooks. Looking through the mypy issue tracker (which goes back 9+ years), I see only a couple of references to import hooks, and those issues have received little or no attention. So I don't think there's a need to solve the general problem of dynamic import hooks.
-Eric _______________________________________________ Typing-sig mailing list -- typing-sig@python.org To unsubscribe send an email to typing-sig-leave@python.org https://mail.python.org/mailman3/lists/typing-sig.python.org/ Member address: gaborjbernat@gmail.com