You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As Armin Ronacher pointed out, it's a bit odd having the importlib.abc.Loader ABC have a method whose default does nothing and having the method itself be entirely optional. Might as well just drop it from the ABC and instead just make sure that create_module() is documented appropriately (it's such an advanced use case it might also simplify things to not have it in the typical user's face).
I suggest waiting until we update the C extension import system before making a final decision - that was the concrete use case for the feature, so it may become less confusing once that is added.
This issue is not talking about dropping create_module() from the algorithm (I need it for the lazy loader), just from the ABC since it's a do-nothing implementation that doesn't have to be there.
Otherwise it should be made a required method and possibly even not have its return None special-casing.
Issue bpo-23014 is planning to make create_module() required so that module creation doesn't have a two-tiered way of specifying a default module (which is handy in C code).
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: