Issue5585
Created on 2009-03-28 11:16 by lekma, last changed 2009-04-02 06:34 by lekma.
|
msg84302 - (view) |
Author: (lekma) |
Date: 2009-03-28 11:16 |
|
It would be useful to have the ability to run arbitrary code before a
manager's server subprocess is started (I'd use this feature to install
signal handlers for example).
|
|
msg84303 - (view) |
Author: (lekma) |
Date: 2009-03-28 11:22 |
|
here is a patch doing just that (against trunk).
ps: this is my first bug report and contribution to Python, please, be
gentle :)
|
|
msg84330 - (view) |
Author: R. David Murray (r.david.murray) |
Date: 2009-03-28 19:41 |
|
Note that the Multiprocessing docs say that the Process "follows the API
of threading.Thread," and this would represent a (minor) divergence.
I also note that the patch does not contain any tests.
|
|
msg84368 - (view) |
Author: (lekma) |
Date: 2009-03-29 08:55 |
|
AFAIK there is no equivalent to the managers api in threading.
As for the tests, what kind of tests would you like to see? Jesse, some
thoughts on that?
|
|
msg84404 - (view) |
Author: R. David Murray (r.david.murray) |
Date: 2009-03-29 14:21 |
|
Right, it's just the Thread/Process API equivalance. I'm not saying
it's a stopper, but the docs would probably need to be modified accordingly.
As for tests, even just one that would prove that the method will be
called and do something trivial would be a good thing to have, IMO.
|
|
msg84406 - (view) |
Author: R. David Murray (r.david.murray) |
Date: 2009-03-29 14:32 |
|
By the way, in case it isn't clear, I defer to Jesse on whether or not
it makes sense to accept this :)
|
|
msg84409 - (view) |
Author: Jesse Noller (jnoller) |
Date: 2009-03-29 14:33 |
|
I know, but tests (like the ones you outlined) would also make it more
compelling
|
|
msg84609 - (view) |
Author: (lekma) |
Date: 2009-03-30 18:43 |
|
> Right, it's just the Thread/Process API equivalance. I'm not saying
> it's a stopper, but the docs would probably need to be modified
> accordingly.
I'm a bit confused here. The patch only adds a small feature to
BaseManager and subtypes (the same way Pool does it already). AFAICT the
Thread/Process API equivalence is preserved. Am I missing something?
This patch should be better:
- checks that initializer is a callable, raise TypeError if not (do it
for Pool.__init__ also).
- adds tests for Pool.__init__ and SyncManager.start
|
|
msg84754 - (view) |
Author: (lekma) |
Date: 2009-03-31 07:12 |
|
The same against py3k.
Jesse, is there any chance that this will make it in, or should I just
go and implement a local solution?
|
|
msg84768 - (view) |
Author: Jesse Noller (jnoller) |
Date: 2009-03-31 12:37 |
|
On Mar 31, 2009, at 2:12 AM, lekma <report@bugs.python.org> wrote:
>
> lekma <lekmalek@gmail.com> added the comment:
>
> The same against py3k.
>
> Jesse, is there any chance that this will make it in, or should I just
> go and implement a local solution?
>
I'm thinking about it and plan on discussing it with other core devs
today. Altering the Api is not something done lightly
|
|
msg84776 - (view) |
Author: (lekma) |
Date: 2009-03-31 13:21 |
|
> I'm thinking about it and plan on discussing it with other core devs
> today. Altering the Api is not something done lightly
yep.
Thanks for considering it.
|
|
msg84778 - (view) |
Author: R. David Murray (r.david.murray) |
Date: 2009-03-31 13:35 |
|
>I'm a bit confused here. The patch only adds a small feature to
>BaseManager and subtypes (the same way Pool does it already). AFAICT the
>Thread/Process API equivalence is preserved. Am I missing something?
No, I'm the one who was missing something. I obviously didn't look at
the patch carefully enough.
|
|
msg85165 - (view) |
Author: Jesse Noller (jnoller) |
Date: 2009-04-02 05:18 |
|
committed in r71041 on python trunk, provided clean buildbots, we will
merge to python 3.1
|
|
msg85174 - (view) |
Author: (lekma) |
Date: 2009-04-02 06:34 |
|
thanks guys
|
|
| Date |
User |
Action |
Args |
| 2009-04-02 06:34:17 | lekma | set | messages:
+ msg85174 |
| 2009-04-02 05:18:14 | jnoller | set | status: open -> closed resolution: fixed messages:
+ msg85165
|
| 2009-03-31 13:35:30 | r.david.murray | set | messages:
+ msg84778 |
| 2009-03-31 13:21:16 | lekma | set | messages:
+ msg84776 |
| 2009-03-31 12:37:28 | jnoller | set | messages:
+ msg84768 |
| 2009-03-31 07:12:23 | lekma | set | files:
+ Issue5585_2_py3k.patch
messages:
+ msg84754 |
| 2009-03-30 18:43:20 | lekma | set | files:
+ Issue5585_2.patch
messages:
+ msg84609 |
| 2009-03-29 14:35:32 | jnoller | set | priority: low |
| 2009-03-29 14:33:42 | jnoller | set | messages:
+ msg84409 |
| 2009-03-29 14:32:46 | r.david.murray | set | messages:
+ msg84406 |
| 2009-03-29 14:21:20 | r.david.murray | set | messages:
+ msg84404 |
| 2009-03-29 08:55:56 | lekma | set | messages:
+ msg84368 |
| 2009-03-28 22:50:15 | jnoller | set | assignee: jnoller |
| 2009-03-28 19:41:20 | r.david.murray | set | nosy:
+ r.david.murray messages:
+ msg84330
assignee: jnoller -> (no value) keywords:
+ patch |
| 2009-03-28 18:59:40 | jnoller | set | keywords:
+ needs review, - patch assignee: jnoller
nosy:
+ jnoller |
| 2009-03-28 11:22:06 | lekma | set | files:
+ Issue5585.patch keywords:
+ patch messages:
+ msg84303
|
| 2009-03-28 11:16:24 | lekma | create | |
|