Update age_impl.py
This commit is contained in:
@@ -23,7 +23,6 @@ from ..base import BaseGraphStorage
|
|||||||
|
|
||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
import asyncio.windows_events
|
import asyncio.windows_events
|
||||||
|
|
||||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||||
|
|
||||||
|
|
||||||
@@ -34,15 +33,9 @@ if not pm.is_installed("psycopg-pool"):
|
|||||||
if not pm.is_installed("asyncpg"):
|
if not pm.is_installed("asyncpg"):
|
||||||
pm.install("asyncpg")
|
pm.install("asyncpg")
|
||||||
|
|
||||||
try:
|
import psycopg
|
||||||
import psycopg
|
from psycopg.rows import namedtuple_row
|
||||||
from psycopg.rows import namedtuple_row
|
from psycopg_pool import AsyncConnectionPool, PoolTimeout
|
||||||
from psycopg_pool import AsyncConnectionPool, PoolTimeout
|
|
||||||
except ImportError:
|
|
||||||
raise ImportError(
|
|
||||||
"`psycopg-pool, psycopg[binary,pool], asyncpg` library is not installed. Please install it via pip: `pip install psycopg-pool psycopg[binary,pool] asyncpg`."
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class AGEQueryException(Exception):
|
class AGEQueryException(Exception):
|
||||||
"""Exception for the AGE queries."""
|
"""Exception for the AGE queries."""
|
||||||
|
Reference in New Issue
Block a user