Populate target objects by default in Store
#581
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Previously, populate_target defaulted to False in the Store. This changes the default to True, meaning that all proxies created by a Store will already be resolved. This will reduce unnecessary resolves of a proxy within the same process that created the proxy.
I consider this a breaking change because any code that assumed a created proxy was not resolved will break. However, this is certainly an edge case (and most likely only prevalent in tests) so I don't expect this to impact most users. If anything, it will remove an unnecessary resolve leading to slightly better performance.
Fixes
populate_target=Truethe default inStore#557Type of Change
Testing
Updated tests which expected a certain setting of
populate_target.Pull Request Checklist
Please confirm the PR meets the following requirements.
pre-commit(e.g., mypy, ruff, etc.).