#31744: Pydoc support/helper
-----------------------------------------------+------------------------
Reporter: Sardorbek Imomaliev | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 3.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------------+------------------------
Currently pydoc doesn't work by default because it requires django
requries `django.setup()` to be called. So to use it you need to provide
some helper script like in this example
https://stackoverflow.com/questions/24772805/python-documentation-for-
django-views-generic-with-pydoc
{{{
#!python
import django
import pydoc
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'dummy.settings'
django.setup()
pydoc.cli()
}}}
Another issue(probably need to create separate for this one) is that when
GDAL is not installed you can't use pydoc even after you have added helper
script, because GDAL has to be setup properly on `import` and there is no
way to make django skip this check. This also prevents running code
analyzing tools like mypy on django without GDAL, which I don't think is
required for running linters.
I don't know how many people are still using `pydoc`. But I think this
should be supported because it is internal `python` documentation tool.
How can I help with resolving this? Maybe django should provide management
command for this?
--
Ticket URL: <https://code.djangoproject.com/ticket/31744>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.123ef9c05a3233e704ed39aee76132f6%40djangoproject.com.