Skip to content

Commit 0d0a406

Browse files
gh-151943: Fix Sphinx reference warnings in Doc/library/xmlrpc.server.rst
- Cross-reference server_bind and server_activate to socketserver.BaseServer - Suppress unresolved reference warnings for _dispatch hook using ! - Disambiguate register_function as SimpleXMLRPCServer.register_function - Remove Doc/library/xmlrpc.server.rst from Doc/tools/.nitignore Signed-off-by: ANISAYAK MITRA <266799942+anisayakmitra-in@users.noreply.github.com>
1 parent 49a344e commit 0d0a406

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎Doc/library/xmlrpc.server.rst‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ servers written in Python. Servers can either be free standing, using
3535
will turn off logging. The *allow_none* and *encoding* parameters are passed
3636
on to :mod:`xmlrpc.client` and control the XML-RPC responses that will be returned
3737
from the server. The *bind_and_activate* parameter controls whether
38-
:meth:`server_bind` and :meth:`server_activate` are called immediately by the
38+
:meth:`~socketserver.BaseServer.server_bind` and
39+
:meth:`~socketserver.BaseServer.server_activate` are called immediately by the
3940
constructor; it defaults to true. Setting it to false allows code to manipulate
4041
the *allow_reuse_address* class variable before the address is bound.
4142
The *use_builtin_types* parameter is passed to the
@@ -96,17 +97,17 @@ alone XML-RPC servers.
9697

9798
Register an object which is used to expose method names which have not been
9899
registered using :meth:`register_function`. If *instance* contains a
99-
:meth:`_dispatch` method, it is called with the requested method name and the
100+
:meth:`!_dispatch` method, it is called with the requested method name and the
100101
parameters from the request. Its API is ``def _dispatch(self, method, params)``
101102
(note that *params* does not represent a variable argument list). If it calls
102103
an underlying function to perform its task, that function is called as
103104
``func(*params)``, expanding the parameter list. The return value from
104-
:meth:`_dispatch` is returned to the client as the result. If *instance* does
105-
not have a :meth:`_dispatch` method, it is searched for an attribute matching
105+
:meth:`!_dispatch` is returned to the client as the result. If *instance* does
106+
not have a :meth:`!_dispatch` method, it is searched for an attribute matching
106107
the name of the requested method.
107108

108109
If the optional *allow_dotted_names* argument is true and the instance does not
109-
have a :meth:`_dispatch` method, then if the requested method name contains
110+
have a :meth:`!_dispatch` method, then if the requested method name contains
110111
periods, each component of the method name is searched for individually, with
111112
the effect that a simple hierarchical search is performed. The value found from
112113
this search is then called with the parameters from the request, and the return
@@ -189,7 +190,7 @@ server::
189190
# Print list of available methods
190191
print(s.system.listMethods())
191192

192-
:meth:`register_function` can also be used as a decorator. The previous server
193+
:meth:`SimpleXMLRPCServer.register_function` can also be used as a decorator. The previous server
193194
example can register functions in a decorator way::
194195

195196
from xmlrpc.server import SimpleXMLRPCServer
@@ -310,9 +311,9 @@ requests sent to Python CGI scripts.
310311

311312
Register an object which is used to expose method names which have not been
312313
registered using :meth:`register_function`. If instance contains a
313-
:meth:`_dispatch` method, it is called with the requested method name and the
314+
:meth:`!_dispatch` method, it is called with the requested method name and the
314315
parameters from the request; the return value is returned to the client as the
315-
result. If instance does not have a :meth:`_dispatch` method, it is searched
316+
result. If instance does not have a :meth:`!_dispatch` method, it is searched
316317
for an attribute matching the name of the requested method; if the requested
317318
method name contains periods, each component of the method name is searched for
318319
individually, with the effect that a simple hierarchical search is performed.

‎Doc/tools/.nitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ Doc/library/wsgiref.rst
1818
Doc/library/xml.dom.minidom.rst
1919
Doc/library/xml.sax.reader.rst
2020
Doc/library/xml.sax.rst
21-
Doc/library/xmlrpc.server.rst

0 commit comments

Comments
 (0)