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
Will that be backported also to Python2.7 ? I personally do not see a reason to teach old dog new tricks but it seems appropriate in such core things. New users could transition easier, otherwise this would be next py2<->py3 difference to explain every time someone uses new code.
Is it needed to specify the fromlist argument for PyImport_ImportModuleLevelObject()? The only effect of this is that Python will try to import the hook as a submodule if it is not an attribute of the parent module. But I think that callable modules is very uncommon case and we should not support is specially. Getting rid of the fromlist argument will simplify the code.
It's a convenient API. I think originally I may have just don't effectively a getattr on the imported module, but I don't remember (and don't have original implementation handy - thanks, rebase!)
I don't have particularly strong feelings on the matter. If you want to submit a PR, I'll take a look. I suppose technically it *is* a functional change that might not be acceptable now that 3.7.0 is released though.
Activity
warsaw commentedon Sep 5, 2017
Placeholder issue for discussion of the design of the implementation of PEP-553.
alkuzad commentedon Sep 13, 2017
Will that be backported also to Python2.7 ? I personally do not see a reason to teach old dog new tricks but it seems appropriate in such core things. New users could transition easier, otherwise this would be next py2<->py3 difference to explain every time someone uses new code.
bitdancer commentedon Sep 13, 2017
It is a new feature, so no it would not be backported.
warsaw commentedon Oct 3, 2017
PEP is accepted. PR needs review.
[-]Implement PEP 553 - built-in debug()[/-][+]Implement PEP 553 - built-in breakpoint()[/+]serhiy-storchaka commentedon Jul 9, 2018
Is it needed to specify the fromlist argument for PyImport_ImportModuleLevelObject()? The only effect of this is that Python will try to import the hook as a submodule if it is not an attribute of the parent module. But I think that callable modules is very uncommon case and we should not support is specially. Getting rid of the fromlist argument will simplify the code.
warsaw commentedon Jul 9, 2018
It's a convenient API. I think originally I may have just don't effectively a getattr on the imported module, but I don't remember (and don't have original implementation handy - thanks, rebase!)
I don't have particularly strong feelings on the matter. If you want to submit a PR, I'll take a look. I suppose technically it *is* a functional change that might not be acceptable now that 3.7.0 is released though.