[3.13] gh-129403: Fix ValueError messages in asyncio.Barrier and threading.Barrier (GH-129419) (#129468)

gh-129403: Fix `ValueError` messages in `asyncio.Barrier` and `threading.Barrier` (GH-129419)
(cherry picked from commit bcb25d60b1)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-01-30 10:33:30 +01:00 committed by GitHub
parent 25a3f3ac46
commit ad4a141a6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -485,7 +485,7 @@ class Barrier(mixins._LoopBoundMixin):
def __init__(self, parties):
"""Create a barrier, initialised to 'parties' tasks."""
if parties < 1:
raise ValueError('parties must be > 0')
raise ValueError('parties must be >= 1')
self._cond = Condition() # notify all tasks when state changes