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

Created on 2015-09-11 04:25 by davin, last changed 2021-09-06 17:13 by iritkatriel.

Files
File name Uploaded Description Edit
issue_25066_sync_objects_reprs.patch davin, 2015-09-11 04:36 review
Messages (4)
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.
History
Date User Action Args
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