This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Consider dropping importlib.abc.Loader.create_module()
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: out of date
Dependencies: 23014 Superseder:
Assigned To: brett.cannon Nosy List: Arfrever, brett.cannon, ncoghlan
Priority: normal Keywords:

Created on 2014-05-26 14:51 by brett.cannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg219159 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-05-26 14:51
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).
msg219189 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-05-26 23:47
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.
msg219225 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-05-27 13:56
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.
msg232566 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-12-12 17:30
Issue #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).
msg234127 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-01-16 13:41
create_module() is now slated to be required in Python 3.6.
History
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65780
2015-01-16 13:41:59brett.cannonsetstatus: open -> closed
resolution: out of date
messages: + msg234127
2014-12-12 17:31:08brett.cannonsetassignee: brett.cannon
2014-12-12 17:30:24brett.cannonsetdependencies: + Don't have importlib.abc.Loader.create_module() be optional
messages: + msg232566
2014-05-27 13:56:19brett.cannonsetmessages: + msg219225
2014-05-27 00:42:54Arfreversetnosy: + Arfrever
2014-05-26 23:47:33ncoghlansetnosy: + ncoghlan
messages: + msg219189
2014-05-26 14:51:45brett.cannonlinkissue21235 dependencies
2014-05-26 14:51:37brett.cannoncreate