Skip to content

#gh-138121 Fixed asyncio lock.locked returning False when waiters exist#153989

Open
EmBeckwith wants to merge 5 commits into
python:mainfrom
EmBeckwith:bugfix/asyncio_lock_locked_returns_true
Open

#gh-138121 Fixed asyncio lock.locked returning False when waiters exist#153989
EmBeckwith wants to merge 5 commits into
python:mainfrom
EmBeckwith:bugfix/asyncio_lock_locked_returns_true

Conversation

@EmBeckwith

Copy link
Copy Markdown

gh-138121 Fix Asyncio.Lock.locked returning True when waiters exist

Currently the behaviour described by Asyncio.Lock.locked() is returning True when there are pending waiters in the loop. As described by the issue, this behaviour is different to the Semaphore primitive.

@bedevere-app

bedevere-app Bot commented Jul 18, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@EmBeckwith EmBeckwith closed this Jul 18, 2026
@EmBeckwith EmBeckwith changed the title #138121 Fixed asyncio lock.locked returning False when waiters exist #gh-138121 Fixed asyncio lock.locked returning False when waiters exist Jul 18, 2026
@EmBeckwith EmBeckwith reopened this Jul 18, 2026
@bedevere-app

bedevere-app Bot commented Jul 18, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant