https://github.com/python/cpython/commit/754b9f28b31e659691e1f3954c9606d0ef064d5d commit: 754b9f28b31e659691e1f3954c9606d0ef064d5d branch: main author: Timofei <[email protected]> committer: kumaraditya303 <[email protected]> date: 2026-07-08T10:15:18Z summary:
gh-149740: Remove redundant self.empty() check in asyncio.Queue.get() (#149741) Co-authored-by: Kumar Aditya <[email protected]> files: M Lib/asyncio/queues.py diff --git a/Lib/asyncio/queues.py b/Lib/asyncio/queues.py index 30004f2bc9bacd..8871cdc16c68b3 100644 --- a/Lib/asyncio/queues.py +++ b/Lib/asyncio/queues.py @@ -178,7 +178,7 @@ async def get(self): or if the queue has been shut down immediately. """ while self.empty(): - if self._is_shutdown and self.empty(): + if self._is_shutdown: raise QueueShutDown getter = self._get_loop().create_future() self._getters.append(getter) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
