Description
In Python, Content.__deepcopy__ preserves shallow copies of a list of fields marked in Content._SHALLOW_COPY_FIELDS. Currently the list only contains raw_representation.
Question: Should deepcopy preserve shallow-copied fields?
What we are currently doing obscures the meaning of deepcopy by creating a partially deepcopied object.
Proposal: discard the unsafe object and log a warning.
Package Versions
agent-framework-core
Python Version
No response
Additional Context
No response
Description
In Python,
Content.__deepcopy__preserves shallow copies of a list of fields marked inContent._SHALLOW_COPY_FIELDS. Currently the list only containsraw_representation.Question: Should
deepcopypreserve shallow-copied fields?What we are currently doing obscures the meaning of
deepcopyby creating a partially deepcopied object.Proposal: discard the unsafe object and log a warning.
Package Versions
agent-framework-core
Python Version
No response
Additional Context
No response