Import upstream version 0.3.0+git20201204.1.f17e648
Debian Janitor
2 years ago
0 | 0 | CHANGES |
1 | 1 | ======= |
2 | ||
3 | ||
4 | 0.3.0 (2020-08-19) | |
5 | ------------------ | |
6 | ||
7 | * Make the plugin compatible with Sphinx 3 | |
8 | ||
2 | 9 | |
3 | 10 | 0.2.0 (2016-04-15) |
4 | 11 | ------------------ |
0 | Copyright 2020 aio-libs collaboration. | |
1 | ||
2 | Licensed under the Apache License, Version 2.0 (the "License"); | |
3 | you may not use this file except in compliance with the License. | |
4 | You may obtain a copy of the License at | |
5 | ||
6 | http://www.apache.org/licenses/LICENSE-2.0 | |
7 | ||
8 | Unless required by applicable law or agreed to in writing, software | |
9 | distributed under the License is distributed on an "AS IS" BASIS, | |
10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
11 | See the License for the specific language governing permissions and | |
12 | limitations under the License. |
0 | include LICENSE.txt | |
0 | include LICENSE | |
1 | 1 | include CHANGES.rst |
2 | 2 | include README.rst |
3 | 3 | include Makefile |
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: sphinxcontrib-asyncio |
2 | Version: 0.2.0 | |
2 | Version: 0.3.0 | |
3 | 3 | Summary: sphinx extension to support coroutines in markup |
4 | 4 | Home-page: https://github.com/aio-libs/sphinxcontrib-asyncio |
5 | 5 | Author: Andrew Svetlov |
10 | 10 | |
11 | 11 | Sphinx extension for adding asyncio-specific markups |
12 | 12 | |
13 | Read docs https://sphinxcontrib-asyncio.readthedocs.io/en/latest/ for more details | |
14 | ||
13 | 15 | CHANGES |
14 | 16 | ======= |
17 | ||
18 | ||
19 | 0.3.0 (2020-08-19) | |
20 | ------------------ | |
21 | ||
22 | * Make the plugin compatible with Sphinx 3 | |
23 | ||
15 | 24 | |
16 | 25 | 0.2.0 (2016-04-15) |
17 | 26 | ------------------ |
25 | 34 | * Initial release |
26 | 35 | Platform: UNKNOWN |
27 | 36 | Classifier: Environment :: Plugins |
37 | Classifier: Framework :: AsyncIO | |
28 | 38 | Classifier: Framework :: Sphinx :: Extension |
29 | 39 | Classifier: Intended Audience :: Developers |
30 | 40 | Classifier: License :: OSI Approved :: Apache Software License |
31 | 41 | Classifier: Programming Language :: Python |
32 | Classifier: Programming Language :: Python :: 2.7 | |
33 | 42 | Classifier: Programming Language :: Python :: 3 |
34 | Classifier: Programming Language :: Python :: 3.3 | |
35 | Classifier: Programming Language :: Python :: 3.4 | |
36 | 43 | Classifier: Programming Language :: Python :: 3.5 |
44 | Classifier: Programming Language :: Python :: 3.6 | |
45 | Classifier: Programming Language :: Python :: 3.7 | |
46 | Classifier: Programming Language :: Python :: 3.8 | |
47 | Classifier: Programming Language :: Python :: 3.9 | |
37 | 48 | Classifier: Topic :: Documentation :: Sphinx |
38 | 49 | Classifier: Topic :: Software Development :: Documentation |
1 | 1 | ===================== |
2 | 2 | |
3 | 3 | Sphinx extension for adding asyncio-specific markups |
4 | ||
5 | Read docs https://sphinxcontrib-asyncio.readthedocs.io/en/latest/ for more details |
14 | 14 | Installation |
15 | 15 | ------------ |
16 | 16 | |
17 | 1. Install from PyPI:: | |
17 | 1. Install from PyPI: | |
18 | ||
19 | .. code-block:: shell | |
18 | 20 | |
19 | 21 | $ pip install sphinxcontrib-asyncio |
20 | 22 | |
21 | 2. Enable ``sphinxcontrib-asyncio`` extension in your ``conf.py``:: | |
23 | 2. Enable ``sphinxcontrib-asyncio`` extension in your ``conf.py``: | |
24 | ||
25 | .. code-block:: python | |
22 | 26 | |
23 | 27 | extensions = ['sphinxcontrib.asyncio'] |
24 | 28 | |
32 | 36 | Simple coroutine function. |
33 | 37 | |
34 | 38 | .. cofunction:: coro(a, b) |
39 | :noindex: | |
35 | 40 | |
36 | 41 | Simple coroutine function. |
37 | 42 | |
44 | 49 | Coroutine method. |
45 | 50 | |
46 | 51 | .. class:: A |
52 | :noindex: | |
47 | 53 | |
48 | 54 | .. comethod:: meth(self, param) |
49 | 55 | |
77 | 83 | |
78 | 84 | .. cofunction:: iter_vals(arg) |
79 | 85 | :async-for: |
86 | :noindex: | |
80 | 87 | |
81 | 88 | A function the returns asynchronous generator. |
82 | 89 | |
100 | 107 | .. cofunction:: get(url) |
101 | 108 | :async-with: |
102 | 109 | :coroutine: |
110 | :noindex: | |
103 | 111 | |
104 | 112 | A function can be used in ``async with`` and ``await`` context. |
105 | 113 | |
114 | 122 | This is classmethod |
115 | 123 | |
116 | 124 | .. class:: A |
125 | :noindex: | |
117 | 126 | |
118 | 127 | .. comethod:: f(cls, arg) |
119 | 128 | :classmethod: |
146 | 155 | Will yield next documentation: |
147 | 156 | |
148 | 157 | .. autocofunction:: coro |
158 | :noindex: | |
149 | 159 | |
150 | 160 | .. autoclass:: MyClass |
151 | 161 | :members: |
162 | :noindex: | |
152 | 163 | |
153 | 164 | You can set directive options by adding it to `autocofunction` and |
154 | 165 | `autocomethod` directives:: |
160 | 171 | .. autocofunction:: coro |
161 | 172 | :async-for: |
162 | 173 | :coroutine: |
174 | :noindex: | |
163 | 175 | |
164 | 176 | You can also force `coroutine` prefix on not-coroutine method by overriding it |
165 | 177 | as `autocomethod` directive:: |
173 | 185 | .. autoclass:: MyClass |
174 | 186 | :members: |
175 | 187 | :exclude-members: my_func |
188 | :noindex: | |
176 | 189 | |
177 | 190 | .. autocomethod:: my_func() |
178 | 191 |
12 | 12 | raise RuntimeError('Unable to determine version.') |
13 | 13 | |
14 | 14 | |
15 | install_requires = ['sphinx'] | |
15 | install_requires = ['sphinx>=3.0'] | |
16 | 16 | |
17 | 17 | |
18 | 18 | def read(f): |
39 | 39 | long_description='\n\n'.join((read('README.rst'), read('CHANGES.rst'))), |
40 | 40 | classifiers=[ |
41 | 41 | 'Environment :: Plugins', |
42 | 'Framework :: AsyncIO', | |
42 | 43 | 'Framework :: Sphinx :: Extension', |
43 | 44 | 'Intended Audience :: Developers', |
44 | 45 | 'License :: OSI Approved :: Apache Software License', |
45 | 46 | 'Programming Language :: Python', |
46 | 'Programming Language :: Python :: 2.7', | |
47 | 47 | 'Programming Language :: Python :: 3', |
48 | 'Programming Language :: Python :: 3.3', | |
49 | 'Programming Language :: Python :: 3.4', | |
50 | 48 | 'Programming Language :: Python :: 3.5', |
49 | 'Programming Language :: Python :: 3.6', | |
50 | 'Programming Language :: Python :: 3.7', | |
51 | 'Programming Language :: Python :: 3.8', | |
52 | 'Programming Language :: Python :: 3.9', | |
51 | 53 | 'Topic :: Documentation :: Sphinx', |
52 | 54 | 'Topic :: Software Development :: Documentation'], |
53 | 55 | author='Andrew Svetlov', |
0 | 0 | from docutils.parsers.rst import directives |
1 | from sphinx.domains.python import PyModulelevel, PyClassmember | |
1 | from sphinx.domains.python import PyFunction, PyMethod | |
2 | 2 | from sphinx.ext.autodoc import FunctionDocumenter, MethodDocumenter, \ |
3 | 3 | bool_option |
4 | 4 | try: |
8 | 8 | """Return True if func is a decorated coroutine function.""" |
9 | 9 | return getattr(func, '_is_coroutine', False) |
10 | 10 | |
11 | __version__ = '0.2.0' | |
11 | __version__ = '0.3.0' | |
12 | 12 | |
13 | 13 | |
14 | 14 | def merge_dicts(*dcts): |
44 | 44 | return ret |
45 | 45 | |
46 | 46 | |
47 | class PyCoroutineFunction(PyCoroutineMixin, PyModulelevel): | |
47 | class PyCoroutineFunction(PyCoroutineMixin, PyFunction): | |
48 | 48 | option_spec = merge_dicts(PyCoroutineMixin.option_spec, |
49 | PyModulelevel.option_spec) | |
49 | PyFunction.option_spec) | |
50 | 50 | |
51 | 51 | def run(self): |
52 | 52 | self.name = 'py:function' |
53 | 53 | return super(PyCoroutineFunction, self).run() |
54 | 54 | |
55 | 55 | |
56 | class PyCoroutineMethod(PyCoroutineMixin, PyClassmember): | |
56 | class PyCoroutineMethod(PyCoroutineMixin, PyMethod): | |
57 | 57 | option_spec = merge_dicts(PyCoroutineMixin.option_spec, |
58 | PyClassmember.option_spec, | |
58 | PyMethod.option_spec, | |
59 | 59 | {'staticmethod': directives.flag, |
60 | 60 | 'classmethod': directives.flag}) |
61 | 61 |
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: sphinxcontrib-asyncio |
2 | Version: 0.2.0 | |
2 | Version: 0.3.0 | |
3 | 3 | Summary: sphinx extension to support coroutines in markup |
4 | 4 | Home-page: https://github.com/aio-libs/sphinxcontrib-asyncio |
5 | 5 | Author: Andrew Svetlov |
10 | 10 | |
11 | 11 | Sphinx extension for adding asyncio-specific markups |
12 | 12 | |
13 | Read docs https://sphinxcontrib-asyncio.readthedocs.io/en/latest/ for more details | |
14 | ||
13 | 15 | CHANGES |
14 | 16 | ======= |
17 | ||
18 | ||
19 | 0.3.0 (2020-08-19) | |
20 | ------------------ | |
21 | ||
22 | * Make the plugin compatible with Sphinx 3 | |
23 | ||
15 | 24 | |
16 | 25 | 0.2.0 (2016-04-15) |
17 | 26 | ------------------ |
25 | 34 | * Initial release |
26 | 35 | Platform: UNKNOWN |
27 | 36 | Classifier: Environment :: Plugins |
37 | Classifier: Framework :: AsyncIO | |
28 | 38 | Classifier: Framework :: Sphinx :: Extension |
29 | 39 | Classifier: Intended Audience :: Developers |
30 | 40 | Classifier: License :: OSI Approved :: Apache Software License |
31 | 41 | Classifier: Programming Language :: Python |
32 | Classifier: Programming Language :: Python :: 2.7 | |
33 | 42 | Classifier: Programming Language :: Python :: 3 |
34 | Classifier: Programming Language :: Python :: 3.3 | |
35 | Classifier: Programming Language :: Python :: 3.4 | |
36 | 43 | Classifier: Programming Language :: Python :: 3.5 |
44 | Classifier: Programming Language :: Python :: 3.6 | |
45 | Classifier: Programming Language :: Python :: 3.7 | |
46 | Classifier: Programming Language :: Python :: 3.8 | |
47 | Classifier: Programming Language :: Python :: 3.9 | |
37 | 48 | Classifier: Topic :: Documentation :: Sphinx |
38 | 49 | Classifier: Topic :: Software Development :: Documentation |
0 | 0 | CHANGES.rst |
1 | LICENSE | |
1 | 2 | MANIFEST.in |
2 | 3 | Makefile |
3 | 4 | README.rst |
8 | 9 | docs/conf.py |
9 | 10 | docs/index.rst |
10 | 11 | docs/make.bat |
12 | docs/_static/.gitignore | |
11 | 13 | sphinxcontrib/__init__.py |
12 | 14 | sphinxcontrib/asyncio.py |
13 | 15 | sphinxcontrib_asyncio.egg-info/PKG-INFO |