-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better repr for multiprocessing.synchronize objects #69252
Comments
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. |
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. |
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. |
The patch need to be converted to a GitHub PR. |
Given #20534 is merged and the multiprocessing.synchronize objects inherit from the corresponding threading module objects, is this still needed? |
Nihir: in synchronize.py, only Barrier inherits from threading.Barrier, as far as I can see. Other classes inherit from |
@pablogsal The issue seems to have been resolved. Can we close it? |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: