Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
asvetlov merged 101 commits intopython:mainfromYvesDup:fix-issue-43352
Mar 25, 2022

Conversation

YvesDup
Copy link
Contributor

@YvesDupYvesDup commentedMar 17, 2021
edited
Loading

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 seehttps://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

jonathanslenders and rpmrmartin reacted with thumbs up emoji
Add a Barrier object to asyncio synchronized primitives
Change after run make patchcheck
run make patchcheck
Add comment when testing self._stateChange if to while instruction  in _block method
Refactoring all test names of BarrierTests to be more readableAdd a method cancel_corosRefactoring and simplifyiing some testsCorrection of RGX_REPR
after run python.bat Tools\scripts\patchcheck.py
@the-knights-who-say-ni

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 thePSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find abugs.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 followthe steps outlined in the CPython devguide to rectify this issue.

You cancheck yourself to see if the CLA has been received.

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

@YvesDupYvesDup changed the titleFix issue 43352bpo-43352: Add a Barrier object in asyncio libMar 17, 2021
@rhettinger
Copy link
Contributor

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

@YvesDup
Copy link
ContributorAuthor

PR was cleaned, stayed only 2 files now

@berkerpeksagberkerpeksag removed their request for reviewMarch 31, 2021 22:43
@rhettinger
Copy link
Contributor

Please update the documentation.

@rhettingerrhettinger removed their request for reviewApril 3, 2021 22:20
@YvesDup
Copy link
ContributorAuthor

@rhettinger I am a rookie on cpython.
Which documentation are talking about ? Are they files about asyncio files ashttps://github.com/python/cpython/blob/master/Doc/library/asyncio-api-index.rst andhttps://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

Sorry, bad merge with master

@asvetlovasvetlov added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMar 25, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@asvetlov for commit3c30290 🤖

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

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMar 25, 2022
@asvetlov
Copy link
Contributor

Merged. Thanks for your patience,@YvesDup

JulienPalard reacted with thumbs up emoji

@YvesDup
Copy link
ContributorAuthor

A very big thank you to@asvetlov and@1st1 for your support and all the work done together on this PR, my first one !!

Thanks to@eamanu for your review, and a special thanks to@JulienPalard for his help especially on the good practices oncpython world.

PS:@asvetlov should I do something else, or just close this PR ?

@asvetlov
Copy link
Contributor

Everything is done. PR is merged,https://bugs.python.org/issue43352 is closed.
The last thing you can do is drop related branch on GitHub, it is up to you.

@YvesDupYvesDup deleted the fix-issue-43352 branchMarch 29, 2022 10:15
@YvesDup
Copy link
ContributorAuthor

@asvetlov Please can tell me how to add a paragraph inwhatnew 3.11#asyncio about this new feature ?
Thank you

@gvanrossum
Copy link
Member

@YvesDup Just submit a PR forDoc/whatsnew/3.11.rst that adds the desired text, and tell the reviewer to mark it for backport to 3.11.

@gvanrossum
Copy link
Member

You can reference the same issue (now migrated to#87518).

YvesDup reacted with thumbs up emoji

@YvesDup
Copy link
ContributorAuthor

YvesDup commentedMay 18, 2022
edited
Loading

@gvanrossum Job in progress. Thank you

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@eamanueamanueamanu left review comments

@asvetlovasvetlovasvetlov approved these changes

@1st11st1Awaiting requested review from 1st11st1 is a code owner

Assignees

@asvetlovasvetlov

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

9 participants
@YvesDup@the-knights-who-say-ni@rhettinger@asvetlov@JulienPalard@bedevere-bot@gvanrossum@1st1@eamanu

[8]ページ先頭

©2009-2025 Movatter.jp