66
77from litestar .constants import HTTP_RESPONSE_START
88from litestar .exceptions import ImproperlyConfiguredException
9- from litestar .types import Empty , EmptyType
109from litestar .utils .dataclass import simple_asdict
1110from oracledb import create_pool_async as oracledb_create_pool
1211from oracledb .connection import AsyncConnection
2625
2726 from litestar import Litestar
2827 from litestar .datastructures .state import State
29- from litestar .types import EmptyType , Message , Scope
28+ from litestar .types import Message , Scope
3029
3130
3231def default_handler_maker (
@@ -122,7 +121,7 @@ class AsyncPoolConfig(GenericPoolConfig[AsyncConnectionPool, AsyncConnection]):
122121class AsyncDatabaseConfig (GenericDatabaseConfig [AsyncConnectionPool , AsyncConnection ]):
123122 """Async Oracle database Configuration."""
124123
125- pool_config : AsyncPoolConfig | None | EmptyType = Empty
124+ pool_config : AsyncPoolConfig | None = None
126125 """Oracle Pool configuration"""
127126
128127 def __post_init__ (self ) -> None :
@@ -145,7 +144,7 @@ def pool_config_dict(self) -> dict[str, Any]:
145144 A string keyed dict of config kwargs for the Asyncpg :func:`create_pool <oracledb.pool.create_pool>`
146145 function.
147146 """
148- if self .pool_config is not None and self . pool_config != Empty :
147+ if self .pool_config is not None :
149148 return simple_asdict (self .pool_config , exclude_empty = True , convert_nested = False )
150149 msg = "'pool_config' methods can not be used when a 'pool_instance' is provided."
151150 raise ImproperlyConfiguredException (msg )
@@ -192,7 +191,7 @@ async def lifespan(
192191 try :
193192 yield
194193 finally :
195- await db_pool .close (force = True )
194+ await db_pool .close ()
196195
197196 async def provide_connection (
198197 self ,
0 commit comments