@@ -10,10 +10,12 @@ A Sphinx extension for running `sphinx-apidoc`_ on each build.
10
10
11
11
.. important ::
12
12
13
- Sphinx includes a built-in extension adding this functionality, with many
14
- of the same options. New users should opt for this extension instead, while
15
- existing users should seek to migrate as this project will eventually be
16
- retired.
13
+ Sphinx 8.2.0 introduced a built-in extension adding this functionality,
14
+ with many of the same options. New users should opt for this extension
15
+ instead, while existing users should seek to migrate as this project will
16
+ eventually be retired. For more information, refer to the
17
+ `sphinx.ext.apidoc `_ documentation. A migration guide is provided `below
18
+ <migration-to-sphinx.ext.apidoc `.
17
19
18
20
Overview
19
21
--------
@@ -104,6 +106,46 @@ The *apidoc* extension uses the following configuration values:
104
106
105
107
**Optional **, defaults to ``[] ``.
106
108
109
+ .. _migration-to-sphinx.ext.apidoc :
110
+
111
+ Migration to ``sphinx.ext.apidoc ``
112
+ ----------------------------------
113
+
114
+ Starting in Sphinx 8.2.0, Sphinx includes the `sphinx.ext.apidoc `_ extension,
115
+ which includes most or all of the functionality provided by this extension. It
116
+ should be preferred for both new and existing users. Consider the previous
117
+ ``conf.py `` example given above:
118
+
119
+ .. code-block :: python
120
+
121
+ extensions = [
122
+ ' sphinxcontrib.apidoc' ,
123
+ # ...
124
+ ]
125
+ apidoc_module_dir = ' ../my_code'
126
+ apidoc_output_dir = ' reference'
127
+ apidoc_excluded_paths = [' tests' ]
128
+ apidoc_separate_modules = True
129
+
130
+ This can be rewritten to use the new extension like so:
131
+
132
+ .. code-block :: python
133
+
134
+ extensions = [
135
+ ' sphinx.ext.apidoc' ,
136
+ # ...
137
+ ]
138
+ apidoc_modules = [
139
+ {
140
+ ' path' : ' ../my_code' ,
141
+ ' destination' : ' reference' ,
142
+ ' exclude_patterns' : [' **/tests/*' ],
143
+ ' separate_modules' : True ,
144
+ },
145
+ ]
146
+
147
+ For more information, refer to the `sphinx.ext.apidoc `_ documentation.
148
+
107
149
Migration from pbr
108
150
------------------
109
151
@@ -325,6 +367,7 @@ Links
325
367
326
368
.. Links
327
369
370
+ .. _sphinx.ext.apidoc : https://www.sphinx-doc.org/en/master/usage/extensions/apidoc.html
328
371
.. _sphinx-apidoc : http://www.sphinx-doc.org/en/stable/man/sphinx-apidoc.html
329
372
.. _sphinx_autodoc : http://www.sphinx-doc.org/en/stable/ext/autodoc.html
330
373
.. _pbr : https://docs.openstack.org/pbr/
0 commit comments