Skip to content

Commit

Permalink
Use contextlib.asynccontextmanager
Browse files Browse the repository at this point in the history
Drop asyncio_extras dependency
  • Loading branch information
qarkai committed Jul 6, 2023
1 parent 7698d09 commit 1e2bda3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions asyncpraw/util/token_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down

0 comments on commit 1e2bda3

Please sign in to comment.