Merge pull request #561 from kdelwat/master
Fix ReadTheDocs build errors
This commit is contained in:
commit
5fbca5b823
27
docs/conf.py
27
docs/conf.py
|
@ -22,7 +22,7 @@ import sanic
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
extensions = []
|
extensions = ['sphinx.ext.autodoc']
|
||||||
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@ pygments_style = 'sphinx'
|
||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
todo_include_todos = False
|
todo_include_todos = False
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output ----------------------------------------------
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
|
@ -80,13 +79,11 @@ html_theme = 'sphinx_rtd_theme'
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ['_static']
|
html_static_path = ['_static']
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTMLHelp output ------------------------------------------
|
# -- Options for HTMLHelp output ------------------------------------------
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = 'Sanicdoc'
|
htmlhelp_basename = 'Sanicdoc'
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
latex_elements = {
|
latex_elements = {
|
||||||
|
@ -110,21 +107,14 @@ latex_elements = {
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [(master_doc, 'Sanic.tex', 'Sanic Documentation',
|
||||||
(master_doc, 'Sanic.tex', 'Sanic Documentation',
|
'Sanic contributors', 'manual'), ]
|
||||||
'Sanic contributors', 'manual'),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for manual page output ---------------------------------------
|
# -- Options for manual page output ---------------------------------------
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [(master_doc, 'sanic', 'Sanic Documentation', [author], 1)]
|
||||||
(master_doc, 'sanic', 'Sanic Documentation',
|
|
||||||
[author], 1)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output -------------------------------------------
|
# -- Options for Texinfo output -------------------------------------------
|
||||||
|
|
||||||
|
@ -132,13 +122,10 @@ man_pages = [
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'Sanic', 'Sanic Documentation',
|
(master_doc, 'Sanic', 'Sanic Documentation', author, 'Sanic',
|
||||||
author, 'Sanic', 'One line description of project.',
|
'One line description of project.', 'Miscellaneous'),
|
||||||
'Miscellaneous'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Epub output ----------------------------------------------
|
# -- Options for Epub output ----------------------------------------------
|
||||||
|
|
||||||
# Bibliographic Dublin Core info.
|
# Bibliographic Dublin Core info.
|
||||||
|
@ -150,8 +137,6 @@ epub_copyright = copyright
|
||||||
# A list of files that should not be packed into the epub file.
|
# A list of files that should not be packed into the epub file.
|
||||||
epub_exclude_files = ['search.html']
|
epub_exclude_files = ['search.html']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -- Custom Settings -------------------------------------------------------
|
# -- Custom Settings -------------------------------------------------------
|
||||||
|
|
||||||
suppress_warnings = ['image.nonlocal_uri']
|
suppress_warnings = ['image.nonlocal_uri']
|
||||||
|
|
|
@ -16,6 +16,7 @@ Guides
|
||||||
sanic/blueprints
|
sanic/blueprints
|
||||||
sanic/config
|
sanic/config
|
||||||
sanic/cookies
|
sanic/cookies
|
||||||
|
sanic/streaming
|
||||||
sanic/class_based_views
|
sanic/class_based_views
|
||||||
sanic/custom_protocol
|
sanic/custom_protocol
|
||||||
sanic/ssl
|
sanic/ssl
|
||||||
|
|
|
@ -7,8 +7,8 @@ On top of being Flask-like, Sanic supports async request handlers. This means y
|
||||||
|
|
||||||
Sanic is developed `on GitHub <https://github.com/channelcat/sanic/>`_. Contributions are welcome!
|
Sanic is developed `on GitHub <https://github.com/channelcat/sanic/>`_. Contributions are welcome!
|
||||||
|
|
||||||
Sanic aspires to be simple:
|
Sanic aspires to be simple
|
||||||
-------------------
|
---------------------------
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,5 @@ dependencies:
|
||||||
- httptools>=0.0.9
|
- httptools>=0.0.9
|
||||||
- ujson>=1.35
|
- ujson>=1.35
|
||||||
- aiofiles>=0.3.0
|
- aiofiles>=0.3.0
|
||||||
|
- websockets>=3.2
|
||||||
- https://github.com/channelcat/docutils-fork/zipball/master
|
- https://github.com/channelcat/docutils-fork/zipball/master
|
|
@ -320,7 +320,7 @@ class Sanic:
|
||||||
the output URL's query string.
|
the output URL's query string.
|
||||||
|
|
||||||
:param view_name: string referencing the view name
|
:param view_name: string referencing the view name
|
||||||
:param **kwargs: keys and values that are used to build request
|
:param \*\*kwargs: keys and values that are used to build request
|
||||||
parameters and query string arguments.
|
parameters and query string arguments.
|
||||||
|
|
||||||
:return: the built URL
|
:return: the built URL
|
||||||
|
|
|
@ -251,8 +251,7 @@ def text(body, status=200, headers=None,
|
||||||
:param body: Response data to be encoded.
|
:param body: Response data to be encoded.
|
||||||
:param status: Response code.
|
:param status: Response code.
|
||||||
:param headers: Custom Headers.
|
:param headers: Custom Headers.
|
||||||
:param content_type:
|
:param content_type: the content type (string) of the response
|
||||||
the content type (string) of the response
|
|
||||||
"""
|
"""
|
||||||
return HTTPResponse(
|
return HTTPResponse(
|
||||||
body, status=status, headers=headers,
|
body, status=status, headers=headers,
|
||||||
|
@ -266,8 +265,7 @@ def raw(body, status=200, headers=None,
|
||||||
:param body: Response data.
|
:param body: Response data.
|
||||||
:param status: Response code.
|
:param status: Response code.
|
||||||
:param headers: Custom Headers.
|
:param headers: Custom Headers.
|
||||||
:param content_type:
|
:param content_type: the content type (string) of the response.
|
||||||
the content type (string) of the response
|
|
||||||
"""
|
"""
|
||||||
return HTTPResponse(body_bytes=body, status=status, headers=headers,
|
return HTTPResponse(body_bytes=body, status=status, headers=headers,
|
||||||
content_type=content_type)
|
content_type=content_type)
|
||||||
|
@ -316,9 +314,9 @@ def stream(
|
||||||
content_type="text/plain; charset=utf-8"):
|
content_type="text/plain; charset=utf-8"):
|
||||||
"""Accepts an coroutine `streaming_fn` which can be used to
|
"""Accepts an coroutine `streaming_fn` which can be used to
|
||||||
write chunks to a streaming response. Returns a `StreamingHTTPResponse`.
|
write chunks to a streaming response. Returns a `StreamingHTTPResponse`.
|
||||||
Example usage:
|
|
||||||
|
|
||||||
```
|
Example usage::
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
async def index(request):
|
async def index(request):
|
||||||
async def streaming_fn(response):
|
async def streaming_fn(response):
|
||||||
|
@ -326,7 +324,6 @@ def stream(
|
||||||
await response.write('bar')
|
await response.write('bar')
|
||||||
|
|
||||||
return stream(streaming_fn, content_type='text/plain')
|
return stream(streaming_fn, content_type='text/plain')
|
||||||
```
|
|
||||||
|
|
||||||
:param streaming_fn: A coroutine accepts a response and
|
:param streaming_fn: A coroutine accepts a response and
|
||||||
writes content to that response.
|
writes content to that response.
|
||||||
|
|
|
@ -75,8 +75,9 @@ class Router:
|
||||||
"""Parse a parameter string into its constituent name, type, and
|
"""Parse a parameter string into its constituent name, type, and
|
||||||
pattern
|
pattern
|
||||||
|
|
||||||
For example:
|
For example::
|
||||||
`parse_parameter_string('<param_one:[A-z]>')` ->
|
|
||||||
|
parse_parameter_string('<param_one:[A-z]>')` ->
|
||||||
('param_one', str, '[A-z]')
|
('param_one', str, '[A-z]')
|
||||||
|
|
||||||
:param parameter_string: String to parse
|
:param parameter_string: String to parse
|
||||||
|
|
Loading…
Reference in New Issue
Block a user