Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 53204a1

Browse filesBrowse files
authored
[3.12] GH-121970: Remove pyspecific PyDecoratorMixin patches (GH-129306) (#129310)
(cherry picked from commit 0ef8d47)
1 parent c17d30b commit 53204a1
Copy full SHA for 53204a1

File tree

Expand file treeCollapse file tree

1 file changed

+1
-28
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-28
lines changed

‎Doc/tools/extensions/pyspecific.py

Copy file name to clipboardExpand all lines: Doc/tools/extensions/pyspecific.py
+1-28Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -96,32 +96,6 @@ def run(self):
9696
return [pnode]
9797

9898

99-
# Support for documenting decorators
100-
101-
class PyDecoratorMixin(object):
102-
def handle_signature(self, sig, signode):
103-
ret = super(PyDecoratorMixin, self).handle_signature(sig, signode)
104-
signode.insert(0, addnodes.desc_addname('@', '@'))
105-
return ret
106-
107-
def needs_arglist(self):
108-
return False
109-
110-
111-
class PyDecoratorFunction(PyDecoratorMixin, PyFunction):
112-
def run(self):
113-
# a decorator function is a function after all
114-
self.name = 'py:function'
115-
return PyFunction.run(self)
116-
117-
118-
# TODO: Use sphinx.domains.python.PyDecoratorMethod when possible
119-
class PyDecoratorMethod(PyDecoratorMixin, PyMethod):
120-
def run(self):
121-
self.name = 'py:method'
122-
return PyMethod.run(self)
123-
124-
12599
class PyCoroutineMixin(object):
126100
def handle_signature(self, sig, signode):
127101
ret = super(PyCoroutineMixin, self).handle_signature(sig, signode)
@@ -360,8 +334,7 @@ def setup(app):
360334
app.add_object_type('pdbcommand', 'pdbcmd', '%s (pdb command)', parse_pdb_command)
361335
app.add_object_type('monitoring-event', 'monitoring-event', '%s (monitoring event)', parse_monitoring_event)
362336
app.add_object_type('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
363-
app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
364-
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
337+
365338
app.add_directive_to_domain('py', 'coroutinefunction', PyCoroutineFunction)
366339
app.add_directive_to_domain('py', 'coroutinemethod', PyCoroutineMethod)
367340
app.add_directive_to_domain('py', 'awaitablefunction', PyAwaitableFunction)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.