New submission from chrysn <chr...@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).

----------
components: None
messages: 125606
nosy: chrysn
priority: normal
severity: normal
status: open
title: inconsistent behavior concerning 
multiprocessing.manager.BaseManager._Server
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10850>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to