Skip to content

implement initializer for multiprocessing.BaseManager.start() #49835

Closed

Description

@lekma
mannequin
BPO 5585
Nosy @bitdancer, @lekma
Files
  • Issue5585.patch
  • Issue5585_2.patch
  • Issue5585_2_py3k.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2009-04-02.05:18:14.264>
    created_at = <Date 2009-03-28.11:16:24.644>
    labels = ['type-feature', 'library']
    title = 'implement initializer for multiprocessing.BaseManager.start()'
    updated_at = <Date 2009-04-02.06:34:16.971>
    user = 'https://github.com/lekma'

    bugs.python.org fields:

    activity = <Date 2009-04-02.06:34:16.971>
    actor = 'lekma'
    assignee = 'jnoller'
    closed = True
    closed_date = <Date 2009-04-02.05:18:14.264>
    closer = 'jnoller'
    components = ['Library (Lib)']
    creation = <Date 2009-03-28.11:16:24.644>
    creator = 'lekma'
    dependencies = []
    files = ['13438', '13478', '13508']
    hgrepos = []
    issue_num = 5585
    keywords = ['patch', 'needs review']
    message_count = 14.0
    messages = ['84302', '84303', '84330', '84368', '84404', '84406', '84409', '84609', '84754', '84768', '84776', '84778', '85165', '85174']
    nosy_count = 3.0
    nosy_names = ['jnoller', 'r.david.murray', 'lekma']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue5585'
    versions = []

    Activity

    1. lekma commented on Mar 28, 2009

      lekmamannequin
      MannequinAuthor

      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).

    2. added
      stdlib
      type-feature
      on Mar 28, 2009
    3. lekma commented on Mar 28, 2009

      lekmamannequin
      MannequinAuthor

      here is a patch doing just that (against trunk).
      ps: this is my first bug report and contribution to Python, please, be
      gentle :)

    4. self-assigned this
      on Mar 28, 2009
    5. bitdancer commented on Mar 28, 2009

      @bitdancer
      Member

      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.

    6. self-assigned this
      on Mar 28, 2009
    7. lekma commented on Mar 29, 2009

      lekmamannequin
      MannequinAuthor

      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?

    8. bitdancer commented on Mar 29, 2009

      @bitdancer
      Member

      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.

    9. bitdancer commented on Mar 29, 2009

      @bitdancer
      Member

      By the way, in case it isn't clear, I defer to Jesse on whether or not
      it makes sense to accept this :)

    10. jnoller commented on Mar 29, 2009

      jnollermannequin
      Mannequin

      I know, but tests (like the ones you outlined) would also make it more
      compelling

    11. lekma commented on Mar 30, 2009

      lekmamannequin
      MannequinAuthor

      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
    12. lekma commented on Mar 31, 2009

      lekmamannequin
      MannequinAuthor

      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?

    13. jnoller commented on Mar 31, 2009

      jnollermannequin
      Mannequin

      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

    14. lekma commented on Mar 31, 2009

      lekmamannequin
      MannequinAuthor

      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.

    15. bitdancer commented on Mar 31, 2009

      @bitdancer
      Member

      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.

    16. jnoller commented on Apr 2, 2009

      jnollermannequin
      Mannequin

      committed in r71041 on python trunk, provided clean buildbots, we will
      merge to python 3.1

    17. lekma commented on Apr 2, 2009

      lekmamannequin
      MannequinAuthor

      thanks guys

    18. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibtype-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions