Skip to content

Better repr for multiprocessing.synchronize objects #69252

Closed

Description

@applio
BPO 25066
Nosy @berkerpeksag, @applio, @pablogsal, @iritkatriel, @akulakov, @kumaraditya303, @nihir27
PRs
  • bpo-25066: Added repr for multiprocessing.Event #29749
  • Dependencies
  • bpo-24391: Better repr for threading objects
  • Files
  • issue_25066_sync_objects_reprs.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 = 'https://github.com/applio'
    closed_at = None
    created_at = <Date 2015-09-11.04:25:12.110>
    labels = ['easy', 'type-feature', 'library', '3.11']
    title = 'Better repr for multiprocessing.synchronize objects'
    updated_at = <Date 2021-12-09.13:16:49.676>
    user = 'https://github.com/applio'

    bugs.python.org fields:

    activity = <Date 2021-12-09.13:16:49.676>
    actor = 'pablogsal'
    assignee = 'davin'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2015-09-11.04:25:12.110>
    creator = 'davin'
    dependencies = ['24391']
    files = ['40432']
    hgrepos = []
    issue_num = 25066
    keywords = ['patch', 'easy']
    message_count = 7.0
    messages = ['250443', '250444', '250448', '401163', '403039', '404210', '408118']
    nosy_count = 9.0
    nosy_names = ['jnoller', 'sbt', 'berker.peksag', 'davin', 'pablogsal', 'iritkatriel', 'andrei.avk', 'kumaraditya', 'nihir27']
    pr_nums = ['29749']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue25066'
    versions = ['Python 3.11']

    Activity

    1. applio commented on Sep 11, 2015

      @applio
      MemberAuthor

      Inspired by bpo-24391 and the changes proposed to the threading module's reprs for Event, Semaphore, BoundedSemaphore, and Barrier, the corresponding objects in the multiprocessing module should have their reprs updated accordingly.

    2. self-assigned this
      on Sep 11, 2015
    3. added
      stdlib
      type-feature
      on Sep 11, 2015
    4. applio commented on Sep 11, 2015

      @applio
      MemberAuthor

      This patch implements the majority opinion from bpo-24391 for the desired format of the reprs produced by Event, Semaphore, BoundedSemaphore, and Barrier. It provides tests around each, inspired by Serhiy's preliminary patch for that same issue but adapted for multiprocessing.

      These tests pass on all but 2 -- it is expected that those 2 will pass once the threading module has been similarly updated as some of the combinatoric tests leverage threading.Event in some cases and multiprocessing.Event in others (and so on for the other synchronization objects). At present, Serhiy's patch still needs updating to match the majority opinion on the repr format, hence it could not yet be applied in combination with this patch for testing. Tests thus far have been performed on OS X 10.10.3.

    5. applio commented on Sep 11, 2015

      @applio
      MemberAuthor

      To Antoine's point in bpo-24391, here too, these modifications to the format of the repr are estimated to have very little impact or risk to breaking existing code.

    6. iritkatriel commented on Sep 6, 2021

      @iritkatriel
      Member

      The patch need to be converted to a GitHub PR.

    7. added
      3.11
      on Sep 6, 2021
    8. nihir27 commented on Oct 1, 2021

      nihir27mannequin
      Mannequin

      Given #20534 is merged and the multiprocessing.synchronize objects inherit from the corresponding threading module objects, is this still needed?

    9. akulakov commented on Oct 18, 2021

      @akulakov
      Contributor

      Nihir: in synchronize.py, only Barrier inherits from threading.Barrier, as far as I can see. Other classes inherit from object.

    10. pablogsal commented on Dec 9, 2021

      @pablogsal
      Member

      New changeset af6b406 by Kumar Aditya in branch 'main':
      bpo-25066: Added repr for multiprocessing.Event (GH-29749)
      af6b406

    11. transferred this issue fromon Apr 10, 2022
    12. furkanonder commented on May 13, 2023

      @furkanonder
      Contributor

      @pablogsal The issue seems to have been resolved. Can we close it?

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.11easystdlibtopic-multiprocessingtype-feature

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions