Skip to content

fix: avoid mutable default argument for metadata_columns#588

Open
AbedSalekin wants to merge 3 commits into
googleapis:mainfrom
AbedSalekin:fix-metadata-columns
Open

fix: avoid mutable default argument for metadata_columns#588
AbedSalekin wants to merge 3 commits into
googleapis: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
@dishaprakash
Copy link
Copy Markdown
Contributor

@AbedSalekin Thank you for raising this PR!

@dishaprakash
Copy link
Copy Markdown
Contributor

/gcbrun

@dishaprakash dishaprakash added the priority: p2 Moderately-important priority. Fix may not be included in next release. label May 12, 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. priority: p2 Moderately-important priority. Fix may not be included in next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants