File tree Expand file tree Collapse file tree
src/langchain_google_cloud_sql_mysql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ dependencies = [
1313 " langchain-community>=0.0.18, <1.0.0" ,
1414 " numpy>=1.24.4, <2.0.0" ,
1515 " SQLAlchemy>=2.0.7, <3.0.0" ,
16- " cloud-sql-python-connector[pymysql]>=1.7 .0, <2.0.0"
16+ " cloud-sql-python-connector[pymysql]>=1.10 .0, <2.0.0"
1717]
1818
1919classifiers = [
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ langchain-community==0.2.0
33numpy === 1.24.4 ; python_version < = "3.8"
44numpy == 1.26.4 ; python_version > "3.8"
55SQLAlchemy == 2.0.30
6- cloud-sql-python-connector [pymysql ]== 1.9.2
6+ cloud-sql-python-connector [pymysql ]== 1.10.0
77
Original file line number Diff line number Diff line change 2121import google .auth .transport .requests
2222import requests
2323import sqlalchemy
24- from google .cloud .sql .connector import Connector
24+ from google .cloud .sql .connector import Connector , RefreshStrategy
2525
2626from .version import __version__
2727
@@ -193,7 +193,9 @@ def _create_connector_engine(
193193 enable_iam_auth = True
194194
195195 if cls ._connector is None :
196- cls ._connector = Connector (user_agent = USER_AGENT )
196+ cls ._connector = Connector (
197+ user_agent = USER_AGENT , refresh_strategy = RefreshStrategy .LAZY
198+ )
197199
198200 # anonymous function to be used for SQLAlchemy 'creator' argument
199201 def getconn () -> pymysql .Connection :
You can’t perform that action at this time.
0 commit comments