[New-bugs-announce] [issue10850] inconsistent behavior concerning multiprocessing.manager.BaseManager._Server
report at bugs.python.org
Fri Jan 7 01:32:54 CET 2011
New submission from chrysn <chrysn at fsfe.org>:
The multiprocessing.manager.BaseManager class has a class property called _Server, defaulting to multiprocessing.manager.Server, that is used in the ._run_server method (typically invoked via .run()) to determine the class of the server that is to be created.
On the other hand, the .get_server() method creates an instance of Server independent of what is configured in ._Server. Thus, managers started via .run() behave slightly different than those started with .get_server().serve_forever(), and in a way that is hard to track.
I am aware that the ._Server property is undocumented, but it's quite useful when extending BaseManager in a way that it needs to be configured by the server.
I suggest to have .get_server() use ._Server instead of Server; I can't think of situations in which this does the wrong thing (rather, I assume that up to now, users of ._Server didn't try running with .get_server().serve_forever(); it seems ._Server is not used in the standard library).
title: inconsistent behavior concerning multiprocessing.manager.BaseManager._Server
versions: Python 3.2
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce