loafer icon indicating copy to clipboard operation
loafer copied to clipboard

with await lock Deprecation on python 3.7

Open fmarcolino opened this issue 4 years ago • 1 comments

https://github.com/georgeyk/loafer/blob/e878f27897776362f6661d31845f756ced7be711/loafer/dispatchers.py#L24

My pytest shows a deprecation on line 24 (It isn't supposed to fix it immediatelly):

DeprecationWarning: 'with await lock' is deprecated use 'async with lock' instead

😁

fmarcolino avatar Jan 14 '21 18:01 fmarcolino

Confirming this breaks when going from Python 3.8 => 3.9 with

fatal error caught: TypeError("object Semaphore can't be used in 'await' expression")

No error if i change to

        async with self._semaphore:

razor-x avatar Nov 07 '21 22:11 razor-x