Consider removing the deepcopy step on validate and get_bundle #14

Closed
opened 6 years ago by novirium · 1 comments
Owner

Currently the validate_bundle() and get_config_bundle() methods do a deepcopy of the result before returning it. This was necessary back when the config source was itself mutated and so needed to be copied. Now that the source and validated config are separate copies anyway, having the bundles return as references rather than copies would be convenient to allow systems to mutate their own configuration, while still maintaining the ability to have a "source of truth" by calling validate_bundle().

Currently the `validate_bundle()` and `get_config_bundle()` methods do a deepcopy of the result before returning it. This was necessary back when the config source was itself mutated and so needed to be copied. Now that the source and validated config are separate copies anyway, having the bundles return as references rather than copies would be convenient to allow systems to mutate their own configuration, while still maintaining the ability to have a "source of truth" by calling `validate_bundle()`.
novirium added the [status] Review [type] Enhancement labels 6 years ago
Poster
Owner

Looks like get_config_bundle() was already doing this anyway 😕

Looks like `get_config_bundle()` was already doing this anyway :confused:
novirium closed this issue 6 years ago
novirium added [status] Done and removed [status] Review labels 6 years ago
Sign in to join this conversation.
Loading…
There is no content yet.