Skip to content
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

bpo-43352: Add a Barrier object in asyncio lib #24903

Merged
merged 101 commits into from Mar 25, 2022
Merged

Conversation

YvesDup
Copy link
Contributor

@YvesDup YvesDup commented Mar 17, 2021

bpo-43352: Add a Barrier object in asyncio lib

Copy design of object Barrier from threading, same features

Modified files are:

file lib/asyncio/locks.py

  • Add Barrier and BrokenBarrierError objects
  • Added these 2 previous objects to 'all' variable

file lib/test/test_asyncio/test_locks.py

  • Add a BarrierTests object
  • Modify STR_RGX_REPR to integrate 'repr' of Barrier
  • Add a new test with Barrier in 'LockTest.test_lock_doesnt_accept_loop_parameter'

I am not familiar with git, so all files with .rst.bak extension are not in the scope of this PR

Just see https://bugs.python.org/issue37945, so the following paragraph can be deleted
"""
All tests (Win10 Python x64) are done and succesfull except one: python -m test -v test_locale
I am surprised about this error because, asyncio and locale are not linked, or are they ?
Please, how to proceed about this failure ? Open a new issue on bpo ?
a log file is available.
Thank for help
"""

https://bugs.python.org/issue43352

YvesDup added 7 commits Mar 16, 2021
Add a Barrier object to asyncio synchronized primitives
Change after run make patchcheck
run make patchcheck
Add comment when testing self._state
Change if to while instruction  in _block method
Refactoring all test names of BarrierTests to be more readable
Add a method cancel_coros
Refactoring and simplifyiing some tests
Correction of RGX_REPR
after run python.bat Tools\scripts\patchcheck.py
@the-knights-who-say-ni
Copy link

@the-knights-who-say-ni the-knights-who-say-ni commented Mar 17, 2021

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@YvesDup

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@YvesDup YvesDup changed the title Fix issue 43352 bpo-43352: Add a Barrier object in asyncio lib Mar 17, 2021
@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Mar 31, 2021

Please post a clean PR. The current version touches 23 files, most of which are new bak files.

@YvesDup
Copy link
Contributor Author

@YvesDup YvesDup commented Mar 31, 2021

PR was cleaned, stayed only 2 files now

@berkerpeksag berkerpeksag removed their request for review Mar 31, 2021
@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Apr 3, 2021

Please update the documentation.

@rhettinger rhettinger removed their request for review Apr 3, 2021
@YvesDup
Copy link
Contributor Author

@YvesDup YvesDup commented Apr 5, 2021

@rhettinger I am a rookie on cpython.
Which documentation are talking about ? Are they files about asyncio files as https://github.com/python/cpython/blob/master/Doc/library/asyncio-api-index.rst and https://github.com/python/cpython/blob/master/Doc/library/asyncio-sync.rst ?
Thank you to help me to this first time
Yves

Add  Barrier object as a clone of threading.Barrier
@asvetlov
Copy link
Contributor

@asvetlov asvetlov commented Mar 25, 2022

Sorry, bad merge with master

@asvetlov asvetlov added the 🔨 test-with-buildbots label Mar 25, 2022
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Mar 25, 2022

🤖 New build scheduled with the buildbot fleet by @asvetlov for commit 3c30290 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots label Mar 25, 2022
@asvetlov asvetlov merged commit d03acd7 into python:main Mar 25, 2022
82 of 85 checks passed
@asvetlov
Copy link
Contributor

@asvetlov asvetlov commented Mar 25, 2022

Merged. Thanks for your patience, @YvesDup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants