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

gh-109564: AddNone check forasyncio.Server._wakeup#126660

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

Open
ordinary-jamie wants to merge8 commits intopython:main
base:main
Choose a base branch
Loading
fromordinary-jamie:asyncio-server-wakeup-none-check
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
fix: Add None check for
  • Loading branch information
@ordinary-jamie
ordinary-jamie committedNov 11, 2024
commita555aa04c06b051bc937b8dfa25113bd719f6171
2 changes: 2 additions & 0 deletionsLib/asyncio/base_events.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -303,6 +303,8 @@ def _detach(self, transport):
self._wakeup()

def _wakeup(self):
if self._waiters is None:
Copy link
Contributor

@graingertgraingertNov 12, 2024
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Might as well do the None check on thewaiters local after it's been assigned fromself._waiters

ordinary-jamie reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Addressed ind963237

return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please add a detailed comment on how a double call can happen (sort of a shorter version of your main PR message)

ordinary-jamie reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Addressed ind963237

waiters = self._waiters
self._waiters = None
for waiter in waiters:
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
Add ``None`` check for :meth:`asyncio.Server._wakeup`. Patch by Jamie Phan.
Loading

[8]ページ先頭

©2009-2025 Movatter.jp