This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Better repr for multiprocessing.synchronize objects
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.11
process
Status: open Resolution:
Dependencies: 24391 Superseder:
Assigned To: davin Nosy List: andrei.avk, berker.peksag, davin, iritkatriel, jnoller, kumaraditya, nihir27, pablogsal, sbt
Priority: normal Keywords: easy, patch

Created on 2015-09-11 04:25 by davin, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
issue_25066_sync_objects_reprs.patch davin, 2015-09-11 04:36 review
Pull Requests
URL Status Linked Edit
PR 29749 merged kumaraditya, 2021-11-24 12:18
Messages (7)
msg250443 - (view) Author: Davin Potts (davin) * (Python committer) Date: 2015-09-11 04:25
Inspired by issue24391 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.
msg250444 - (view) Author: Davin Potts (davin) * (Python committer) Date: 2015-09-11 04:36
This patch implements the majority opinion from issue24391 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.
msg250448 - (view) Author: Davin Potts (davin) * (Python committer) Date: 2015-09-11 04:46
To Antoine's point in issue24391, here too, these modifications to the format of the repr are estimated to have very little impact or risk to breaking existing code.
msg401163 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-09-06 17:13
The patch need to be converted to a GitHub PR.
msg403039 - (view) Author: Nihir Patel (nihir27) Date: 2021-10-01 22:47
Given https://github.com/python/cpython/pull/20534 is merged and the multiprocessing.synchronize objects inherit from the corresponding threading module objects, is this still needed?
msg404210 - (view) Author: Andrei Kulakov (andrei.avk) * (Python triager) Date: 2021-10-18 18:55
Nihir: in synchronize.py, only Barrier inherits from threading.Barrier, as far as I can see. Other classes inherit from `object`.
msg408118 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-12-09 13:16
New changeset af6b4068859a5d0c8afd696f3c0c0155660211a4 by Kumar Aditya in branch 'main':
bpo-25066: Added repr for multiprocessing.Event (GH-29749)
https://github.com/python/cpython/commit/af6b4068859a5d0c8afd696f3c0c0155660211a4
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69252
2021-12-09 13:16:49pablogsalsetnosy: + pablogsal
messages: + msg408118
2021-11-24 12:18:24kumaradityasetkeywords: + patch
nosy: + kumaraditya

pull_requests: + pull_request27986
stage: needs patch -> patch review
2021-10-18 18:55:53andrei.avksetnosy: + andrei.avk
messages: + msg404210
2021-10-01 22:47:48nihir27setnosy: + nihir27
messages: + msg403039
2021-09-06 17:13:14iritkatrielsetversions: + Python 3.11, - Python 3.5, Python 3.6
nosy: + iritkatriel

messages: + msg401163

keywords: + easy, - patch
stage: patch review -> needs patch
2015-09-11 10:50:35berker.peksagsetnosy: + berker.peksag
2015-09-11 04:46:56davinsetmessages: + msg250448
2015-09-11 04:36:23davinsetfiles: + issue_25066_sync_objects_reprs.patch
keywords: + patch
messages: + msg250444

stage: needs patch -> patch review
2015-09-11 04:26:01davinsetdependencies: + Better repr for threading objects
2015-09-11 04:25:12davincreate