-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Ideally, Docs should not have to import anything in order to operate.
Right now docs.get uses the _import method of the docs.import.Import object, which uses the __import__ built-in in.
There are legitimate reasons why you might want to perform an import. For example, if you want to get a C extension's docstring, you're pretty much stuck with grabbing the __doc__ attribute of the extension after it's imported. So, while we don't want to kill off all imports, for security reasons, we generally want to discourage it.
docs.get should probably be able to operate without import by default, and execution with imports should probably require a special kwarg.