File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
src/langchain_google_cloud_sql_pg Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ readme = "README.md"
66license = {file = " LICENSE" }
77requires-python = " >=3.8"
88dependencies = [
9- " cloud-sql-python-connector[asyncpg] >= 1.6 .0, <2.0.0" ,
9+ " cloud-sql-python-connector[asyncpg] >= 1.7 .0, <2.0.0" ,
1010 " langchain-core>=0.1.1, <2.0.0 " ,
1111 " langchain-community>=0.0.18, <0.1.0" ,
1212 " pgvector>=0.2.5, <1.0.0" ,
Original file line number Diff line number Diff line change 2626from sqlalchemy import text # Column,
2727from sqlalchemy .ext .asyncio import AsyncEngine , create_async_engine
2828
29+ from .version import __version__
30+
2931if TYPE_CHECKING :
3032 import asyncpg # type: ignore
3133 import google .auth .credentials # type: ignore
3234
3335T = TypeVar ("T" )
3436
37+ USER_AGENT = "langchain-google-cloud-sql-pg-python/" + __version__
38+
3539
3640async def _get_iam_principal_email (
3741 credentials : google .auth .credentials .Credentials ,
@@ -143,7 +147,9 @@ async def _create(
143147 "authentication or neither for IAM DB authentication."
144148 )
145149 if cls ._connector is None :
146- cls ._connector = await create_async_connector ()
150+ cls ._connector = Connector (
151+ loop = asyncio .get_event_loop (), user_agent = USER_AGENT
152+ )
147153 # if user and password are given, use basic auth
148154 if user and password :
149155 enable_iam_auth = False
Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515#
16- __version__ = "0.1.0 "
16+ __version__ = "0.0.1 "
You can’t perform that action at this time.
0 commit comments