Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mvanveen opened this issue Apr 8, 2012 · 0 comments
Open

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

mvanveen opened this issue Apr 8, 2012 · 0 comments

Comments

@mvanveen
Copy link
Member

mvanveen commented Apr 8, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant