async-lru icon indicating copy to clipboard operation
async-lru copied to clipboard

DeprecationWarning in Python 3.8

Open tirkarthi opened this issue 6 years ago • 5 comments

@asyncio.coroutine was deprecated in Python 3.8 with https://github.com/python/cpython/pull/13346. loop argument is also deprecated. I am not sure async def can be used since the project ensures compatiblity with 3.3 and above whereas the syntax was present from 3.5 I guess. 3.4 also reached end of life.

  /home/karthi/async_lru/async_lru.py:191: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
    def wrapped(*fn_args, **fn_kwargs):

  /home/karthi/async_lru/tests/test_basic.py:146: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
    def coro():

  /home/karthi/async_lru/tests/test_close.py:26: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.1, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:14: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.2, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:64: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.1, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:54: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.2, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:94: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.1, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:84: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.2, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:122: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.1, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:112: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.2, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:156: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.1, loop=loop)

  /home/karthi/async_lru/tests/test_close.py:146: DeprecationWarning: The loop argument is deprecated and scheduled for removal in Python 3.10.
    await asyncio.sleep(0.2, loop=loop)

tirkarthi avatar May 17 '19 04:05 tirkarthi

I think dropping python 3.3 and 3.4 is fine

asvetlov avatar May 17 '19 08:05 asvetlov

Just to add testing for 3.3 and 3.4 was also dropped from .travis.yml in the CI with https://github.com/aio-libs/async_lru/commit/4419d97d3e63690146cb9b45bbefb5962f562bf0#diff-354f30a63fb0907d4ad57269548329e3 .

tirkarthi avatar May 17 '19 08:05 tirkarthi

having same issue

kamikaze avatar Jul 03 '20 10:07 kamikaze

../python3.8/site-packages/async_lru.py:96: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
    def _wait_closed(wrapped, *, return_exceptions, loop):

same issue +1

leohowell avatar Jan 27 '21 11:01 leohowell

+1 - Seeing the same issue in release async-lru==1.0.2 using Python 3.8.5

/usr/local/lib/python3.8/dist-packages/async_lru.py:96: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead

danielflippance avatar Oct 25 '21 18:10 danielflippance

The master has no such warnings, closing the issue.

asvetlov avatar Feb 18 '23 23:02 asvetlov