-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization from_dict
modifies input dictionary
#2799
Comments
@pvaneck this might have been accidentally introduced bc we're optimizing for our new models, and with our new models we don't have anything like |
We ever had discussion with Laurent #2430 (comment) that it might bring risks if change the deserialization logic of msrest. Let me make up some complicated test to check it, if passed, I think we had better fix it directly like https://github.com/Azure/autorest.python/pull/2430/files |
@pvaneck We will fix it soon and to unblock your development, you could manually change |
In the generated
serialization.py
file, if a user tries to callfrom_dict
on a model that has_subtype_map
values, those values are popped from the original dictionary. See here.Here is a sample issue showcasing this behavior: Azure/azure-sdk-for-python#37024
Here is also a simpler recreation:
VectorSearchAlgorithmConfiguration
has:I feel like the input dictionary should remain unmodified. Is mutating the input dictionary intentional?
The text was updated successfully, but these errors were encountered: