classification
Title: Remove support for "with (await asyncio.lock):"
Type: Stage: resolved
Components: asyncio Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, eamanu, xtreak, yselivanov
Priority: normal Keywords: patch

Created on 2018-09-24 18:57 by yselivanov, last changed 2020-02-01 11:14 by asvetlov. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17533 merged asvetlov, 2019-12-09 15:31
Messages (6)
msg326282 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2018-09-24 19:03
Never mind, we do this already.  The question is then should we just remove the support for this syntax entirely in 3.8, or we should wait until 3.9?
msg326315 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-25 04:23
I can see only around 3 results on GitHub with "with await asyncio.lock"  and just wanted to add it as a data point : https://github.com/search?utf8=%E2%9C%93&q=%22with+await+asyncio.lock%22&type=Code
msg326317 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-25 04:27
Another discussion : https://github.com/python/cpython/pull/4753/files#r155656583
msg326425 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2018-09-26 07:46
I don't care too much.
Maybe removal is just fine.
`with await ...` looks awkward anyway
msg343866 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2019-05-29 06:57
Let's postpone to 3.9
I recall at least reports for aioredis, aiomysql and aiokafka for these deprecation warnings.
Sure, fix is trivial (and will be applied to next release of libs) but I pretty sure there are many other usages.
msg361160 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2020-02-01 11:12
New changeset 90d9ba6ef10af32e8dfe0649789c3a8ccf419e95 by Andrew Svetlov in branch 'master':
bpo-34793: Drop old-style context managers in asyncio.locks (GH-17533)
https://github.com/python/cpython/commit/90d9ba6ef10af32e8dfe0649789c3a8ccf419e95
History
Date User Action Args
2020-02-01 11:14:45asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-02-01 11:12:55asvetlovsetmessages: + msg361160
2019-12-09 15:31:39asvetlovsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17011
2019-05-29 06:57:38asvetlovsetmessages: + msg343866
versions: + Python 3.9, - Python 3.8
2019-02-20 02:44:36eamanusetnosy: + eamanu
2018-09-26 07:46:47asvetlovsetmessages: + msg326425
2018-09-25 04:27:00xtreaksetmessages: + msg326317
2018-09-25 04:23:50xtreaksetnosy: + xtreak
messages: + msg326315
2018-09-24 19:03:31yselivanovsetmessages: + msg326282
title: Raise DeprecationWarning for "with (await lock):" -> Remove support for "with (await asyncio.lock):"
2018-09-24 18:57:32yselivanovcreate