Issue #3355
closedGetting an error building docs with Sphinx 1.7
Description
A new version of sphinx was released today and it fails to build our docs:
/home/vagrant/devel/pulp/pulpcore/pulpcore/app/serializers/base.py:docstring of pulpcore.app.serializers.base.ModelSerializer.create:5:Inline strong start-string without end-string.
This previously worked with Sphinx 1.6.7.
Updated by daviddavis almost 7 years ago
Here are the lines causing the problems:
https://github.com/encode/django-rest-framework/blob/master/rest_framework/serializers.py#L888
https://github.com/encode/django-rest-framework/blob/master/rest_framework/serializers.py#L895
Escaping the asterisks in my local copy of this file with backslashes fixed the problem for me.
Updated by dalley almost 7 years ago
- Sprint/Milestone set to 54
- Triaged changed from No to Yes
Updated by daviddavis almost 7 years ago
One thing I found that fixes the problem is to add docstring to ModelSerializer.create[0]. It looks like this prevents sphinx from looking up and parsing the docstring from DRF's ModelSerializer.create method (which has the offending problem). I don't think this is a good long-term solution though.
[0] https://github.com/pulp/pulp/blob/3.0-dev/pulpcore/pulpcore/app/serializers/base.py#L105
Updated by bizhang almost 7 years ago
I opened a PR to upstream django-rest-framework, but it was rejected :(
https://github.com/encode/django-rest-framework/pull/5832
I think the next best solution is to go with @daviddavis's proposal in https://pulp.plan.io/issues/3355#note-3
Added by werwty almost 7 years ago
Added by werwty almost 7 years ago
Revision f6be2d71 | View on GitHub
Add docstring to fix Sphinx 1.7
Updated by bizhang almost 7 years ago
- Status changed from NEW to POST
- Assignee set to bizhang
Updated by werwty almost 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|f6be2d71e7f914721a58d463a82fd2c9131e5749.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Add docstring to fix Sphinx 1.7
closes #3355 https://pulp.plan.io/issues/3355