bpo-40899: Document exception raised when module cannot be imported#27709
bpo-40899: Document exception raised when module cannot be imported#27709dukecat0 wants to merge 6 commits intopython:mainfrom
Conversation
ambv
left a comment
There was a problem hiding this comment.
- Note Ronald's comment on arbitrary exceptions being raised from a module body while it's being imported.
- Please don't insert error handling information in the leading paragraph. Look at other functions in functions.rst, they have exception information listed further in the text, usually as the last paragraph describing them.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
while I've Approved this change from the standpoint of not being a bad thing to document, I do think the above should be addressed first. |
|
This PR is stale because it has been open for 30 days with no activity. |
|
@meowmeowmeowcat This has been awaiting changes for over a year. Are you planning to finish this or shall we close it so someone else can pick it up? |
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I am going to finish this. Sorry for the late response! I have made the requested changes; please review again |
|
Thanks for making the requested changes! @iritkatriel, @ambv, @gpshead: please review the changes made to this pull request. |
| An :exc:`ImportError` exception can be raised if the module cannot be imported | ||
| successfully. |
There was a problem hiding this comment.
I'm not sure I like this wording - what do you mean "can be raised", it sounds like it is possible for import to fail and not raise an exception.
There was a problem hiding this comment.
Note Ronald's comment on arbitrary exceptions being raised from a module body while it's being imported.
It means arbitrary exceptions can also be raised.
There was a problem hiding this comment.
I understand the intent, but I don't think that's the only possible interpretation of the current wording.
There was a problem hiding this comment.
I just found out that #94662 is also doing the same thing. Would you prefer that one?
https://bugs.python.org/issue40899