diff --git a/AUTHORS.rst b/AUTHORS.rst index 26716aca..e7683d45 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -91,4 +91,5 @@ Source Contributors - Josh Kim `@jsk56143 `_ - Rolf Campbell `@endlisnis `_ - zacc `@zacc `_ +- Arkadiy Illarionov `@qarkai `_ - Add "Name and github profile link" above this line. diff --git a/CHANGES.rst b/CHANGES.rst index ab3ece0f..7eee2c55 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,10 @@ Async PRAW follows `semantic versioning `_. Unreleased ---------- +**Changed** + +- Drop asyncio_extras dependency, use contextlib.asynccontextmanager instead. + 7.7.0 (2023/02/25) ------------------ 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 936c5732..4792b627 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,6 @@ "aiofiles <1", "aiohttp <4", "aiosqlite <=0.17.0", - "asyncio_extras <=1.3.2", "asyncprawcore >=2.1, <3", "update_checker >=0.18", ],