[issue40899] Document exceptions raised by importlib.import

2021-10-23 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue40899] Document exceptions raised by importlib.import

2021-08-14 Thread meowmeowcat
meowmeowcat added the comment: So.. maybe changing ``the module cannot be imported`` to ``the module is not found``? -- ___ Python tracker ___ ___

[issue40899] Document exceptions raised by importlib.import

2021-08-13 Thread meowmeowcat
Change by meowmeowcat : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat
meowmeowcat added the comment: > ``importlib.import_module("t")`` will raise ZeroDivisionError. I've tested ``__import__`` with the same code, and it will raise ZeroDivisionError too. -- ___ Python tracker ___

[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat
meowmeowcat added the comment: Maybe we can add something like: ``` If the module cannot be imported,:exc:`ImportError` is usually raised. .. note:: Sometimes other errors are raised if the module cannot be imported successfully. See https://docs.python.org/3/library/exceptions.html f

[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: Good question. Hopefully one of the documentation or importlib experts can chime in about that. I may also have uncovered a new issue in importlib ;-) Personally I'd say that documenting raising ImportError is still useful because that's the common excepti

[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat
meowmeowcat added the comment: Oh, I didn't realize that. Then maybe we don't need to document ImportError in https://docs.python.org/3/library/importlib.html#importlib.import_module? -- ___ Python tracker

[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that importlib.import_module, and the import statement itself, can raise an arbitrary exception when that exception is raised while executing the module body. This is easily observed by creating a module that just raises an error in its body: # t.py

[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat
meowmeowcat added the comment: Thanks! I've opened a PR for this issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40899] Document exceptions raised by importlib.import

2021-08-10 Thread meowmeowcat
Change by meowmeowcat : -- keywords: +patch nosy: +meowmeowmeowcat nosy_count: 3.0 -> 4.0 pull_requests: +26194 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27709 ___ Python tracker

[issue40899] Document exceptions raised by importlib.import

2021-08-07 Thread Irit Katriel
Irit Katriel added the comment: ModuleNotFoundError is a subclass of ImportError, so it's probably enough to just document the functions as raising ImportError on failure, as in the case of https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module. -- keyword

[issue40899] Document exceptions raised by importlib.import

2020-06-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Ddcument exceptions raised by importlib.import -> Document exceptions raised by importlib.import ___ Python tracker ___