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
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.
The text was updated successfully, but these errors were encountered:
Ideally, Docs should not have to import anything in order to operate.
Right now
docs.get
uses the_import
method of thedocs.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.The text was updated successfully, but these errors were encountered: