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.

Author ncoghlan
Recipients Arfrever, brett.cannon, eric.snow, ncoghlan
Date 2014-12-10.16:01:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418227297.75.0.471458027.issue23014@psf.upfronthosting.co.za>
In-reply-to
Content
The specific reason I wanted the "return None to delegate to the default behaviour" feature was to make it easier to migrate the C extension machinery.

With that design, a PEP 451 based C extension loader would just need to return None when there was no appropriate "Create" symbol exported from the module.

If returning None was disallowed, it would need to instead arrange to call importlib.util.module_from_spec(). That's doable, of course, but requires loaders to reimplement behaviour provided by the standard import system, rather than being able to just say "do the default thing, whatever that happens to be". That's the kind of really easy to get wrong responsibility I appreciated PEP 451 taking *away* from custom loaders.

However, I have no problem with making create_module() mandatory if the "return None to request the default behaviour" feature is retained. As you say, adding an implementation that returns None is both easy and remains compatible with Python 3.4.
History
Date User Action Args
2014-12-10 16:01:37ncoghlansetrecipients: + ncoghlan, brett.cannon, Arfrever, eric.snow
2014-12-10 16:01:37ncoghlansetmessageid: <1418227297.75.0.471458027.issue23014@psf.upfronthosting.co.za>
2014-12-10 16:01:37ncoghlanlinkissue23014 messages
2014-12-10 16:01:37ncoghlancreate