Skip to content

(Feature) Make docs.get work without import #2

Open
@mvanveen

Description

@mvanveen

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions