Python 3.15 is out with explicit lazy imports, UTF-8 as the default encoding, frozendict and sentinel types, the Tachyon ...
Python programs are set to get faster startup times with PEP 810 "Explicit lazy imports," which allows scripts to defer loading imported libraries until they're actually needed rather than at startup.
Python 3.15 is expected to speed up some programs and simplifies handling immutable data. UTF-8 as standard requires testing.
Or, on the assumption that you're willing to do work to support lazy loading, you move all of the global code bar imports into the init function, and then have the last line of your module be init().
Starting a Python application typically results in a flurry of imports as modules from various locations (and the modules they import) get added into the application process. All of that occurs before ...