Skip to content

fix: avoid mutable default argument for metadata_columns#588

Open
AbedSalekin wants to merge 2 commits intogoogleapis:mainfrom
AbedSalekin:fix-metadata-columns
Open

fix: avoid mutable default argument for metadata_columns#588
AbedSalekin wants to merge 2 commits intogoogleapis:mainfrom
AbedSalekin:fix-metadata-columns

Conversation

@AbedSalekin
Copy link
Copy Markdown

Fixes a Python mutable default argument issue in metadata_columns.

Replaces default [] with None and initializes safely inside functions:
if metadata_columns is None:
metadata_columns = []

This prevents unintended shared state across function calls

@AbedSalekin AbedSalekin requested review from a team as code owners April 13, 2026 21:35
@product-auto-label product-auto-label bot added the api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API. label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: alloydb Issues related to the googleapis/langchain-google-alloydb-pg-python API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants