Skip to content

Commit bcececd

Browse files
[3.13] GH-121970: Remove pyspecific PyDecoratorMixin patches (GH-129306) (#129309)
GH-121970: Remove pyspecific ``PyDecoratorMixin`` patches (GH-129306) (cherry picked from commit 0ef8d47) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent b2ae234 commit bcececd

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

Doc/tools/extensions/pyspecific.py

-28
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)
@@ -359,8 +333,6 @@ def setup(app):
359333
app.add_object_type('opcode', 'opcode', '%s (opcode)', parse_opcode_signature)
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)
362-
app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
363-
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
364336
app.add_directive_to_domain('py', 'coroutinefunction', PyCoroutineFunction)
365337
app.add_directive_to_domain('py', 'coroutinemethod', PyCoroutineMethod)
366338
app.add_directive_to_domain('py', 'awaitablefunction', PyAwaitableFunction)

0 commit comments

Comments
 (0)