From 1e2bda331fbe272b4d3b7cfc08e0357c4557ea47 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Thu, 6 Jul 2023 22:28:31 +0300 Subject: [PATCH] Use contextlib.asynccontextmanager Drop asyncio_extras dependency --- asyncpraw/util/token_manager.py | 4 ++-- setup.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/asyncpraw/util/token_manager.py b/asyncpraw/util/token_manager.py index be17a577..3df0adaa 100644 --- a/asyncpraw/util/token_manager.py +++ b/asyncpraw/util/token_manager.py @@ -12,9 +12,9 @@ """ from abc import ABC, abstractmethod +from contextlib import asynccontextmanager import aiofiles -from asyncio_extras import async_contextmanager from . import _deprecate_args @@ -159,7 +159,7 @@ async def close(self): """Close the sqlite3 connection.""" await self._connection.close() - @async_contextmanager + @asynccontextmanager async def connection(self): """Asynchronously setup and provide the sqlite3 connection.""" if self._connection is None: diff --git a/setup.py b/setup.py index 8ca35c43..59ae6910 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,6 @@ "aiofiles <1", "aiohttp <4", "aiosqlite <=0.17.0", - "asyncio_extras <=1.3.2", "asyncprawcore >=2.1, <3", "update_checker >=0.18", ],