| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
I think this approach makes sense...
Sorry, something went wrong.
|
This went directly into 3.15, does it need forward porting to main? |
Sorry, something went wrong.
Correct, thank you for catching that. Great work @DinoV! This was the cleanest idea. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The PEP initially set sys.lazy_modules was to be a set of the lazily imported things. At some point it seemed that having our internal tracking for publishing submodules to parent modules when they're imported could be combined with this. But this means that data the interpreter is making decisions on is now immutable. This goes back to having a separate set for the lazy modules which is user visible but has no impact on how lazy imports are evaluated or executed.
This is one possible approach - another one would be to make it a function and calculate the set and return it per-call. Then it would be backed by our normal internal data.
We could also make it a function and keep tracking both sets of data as this PR does and then that'd give us the ability in the future to lazily calculate the data.