Can someone run a test for me with Python 3.15 lazy import feature.

Due to lightning strike frying my internet router and a number of machines in my home, limited as to what can do right now. I need confirmation that lazy imports break wrapt post import hooks.

import wrapt, time

@wrapt.when_imported("graphlib")
def module_imported(module):
print("imported")

print("lazy import")

lazy import graphlib

print("sleeping")

time.sleep(5)

print("access")

print(graphlib.TopologicalSorter)

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/grahamdumpleton/statuses/116275131029334897 on your instance and quote it. (Note that quoting is not supported in Mastodon.)