File tree 4 files changed +22
-4
lines changed
4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,8 @@ Release 3.5.4 (in development)
140
140
Dependencies
141
141
------------
142
142
143
+ * #9071: Restrict docutils to 0.16
144
+
143
145
Incompatible changes
144
146
--------------------
145
147
@@ -152,7 +154,10 @@ Features added
152
154
Bugs fixed
153
155
----------
154
156
157
+ * #9078: autodoc: Async staticmethods and classmethods are considered as non
158
+ async coroutine-functions with Python3.10
155
159
* #8870: The style of toctree captions has been changed with docutils-0.17
160
+ * #9001: The style of ``sidebar`` directive has been changed with docutils-0.17
156
161
157
162
Testing
158
163
--------
Original file line number Diff line number Diff line change 23
23
'sphinxcontrib-qthelp' ,
24
24
'Jinja2>=2.3' ,
25
25
'Pygments>=2.0' ,
26
- 'docutils>=0.14' ,
26
+ 'docutils>=0.14,<0.17 ' ,
27
27
'snowballstemmer>=1.1' ,
28
28
'babel>=1.3' ,
29
29
'alabaster>=0.7,<0.8' ,
Original file line number Diff line number Diff line change @@ -319,7 +319,8 @@ img.align-default, .figure.align-default {
319
319
320
320
/* -- sidebars -------------------------------------------------------------- */
321
321
322
- div.sidebar {
322
+ div.sidebar,
323
+ aside.sidebar {
323
324
margin: 0 0 0.5em 1em;
324
325
border: 1px solid #ddb;
325
326
padding: 7px;
@@ -377,12 +378,14 @@ div.body p.centered {
377
378
/* -- content of sidebars/topics/admonitions -------------------------------- */
378
379
379
380
div.sidebar > :last-child,
381
+ aside.sidebar > :last-child,
380
382
div.topic > :last-child,
381
383
div.admonition > :last-child {
382
384
margin-bottom: 0;
383
385
}
384
386
385
387
div.sidebar::after,
388
+ aside.sidebar::after,
386
389
div.topic::after,
387
390
div.admonition::after,
388
391
blockquote::after {
Original file line number Diff line number Diff line change @@ -361,8 +361,18 @@ def isroutine(obj: Any) -> bool:
361
361
362
362
def iscoroutinefunction (obj : Any ) -> bool :
363
363
"""Check if the object is coroutine-function."""
364
- # unwrap staticmethod, classmethod and partial (except wrappers)
365
- obj = unwrap_all (obj , stop = lambda o : hasattr (o , '__wrapped__' ))
364
+ def iswrappedcoroutine (obj : Any ) -> bool :
365
+ """Check if the object is wrapped coroutine-function."""
366
+ if isstaticmethod (obj ) or isclassmethod (obj ) or ispartial (obj ):
367
+ # staticmethod, classmethod and partial method are not a wrapped coroutine-function
368
+ # Note: Since 3.10, staticmethod and classmethod becomes a kind of wrappers
369
+ return False
370
+ elif hasattr (obj , '__wrapped__' ):
371
+ return True
372
+ else :
373
+ return False
374
+
375
+ obj = unwrap_all (obj , stop = iswrappedcoroutine )
366
376
if hasattr (obj , '__code__' ) and inspect .iscoroutinefunction (obj ):
367
377
# check obj.__code__ because iscoroutinefunction() crashes for custom method-like
368
378
# objects (see https://github.com/sphinx-doc/sphinx/issues/6605)
You can’t perform that action at this time.
0 commit comments