-
Notifications
You must be signed in to change notification settings - Fork 218
Add context manager for allowing unresolved templates and make the state members private + remove support for directly setting enable_templating and expect_resolved_template_values
#4735
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
Conversation
89baf77 to
1c7bdec
Compare
This should only be disabled temporarily so make the state private and expose only the context manager and a property.
Only expose the context manager and a property
Allows to use the `resolve` member method that checks for generated values already.
This reverts commit 2a63863.
1c7bdec to
45196fb
Compare
boegel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but I would like to see this tested thoroughly via updated Bundle easyblock in easybuilders/easybuild-easyblocks#3547 before merging it...
|
I can do that. Any specific ECs in mind or just 3-4 ones using |
|
@boegel Test report using this: easybuilders/easybuild-easyblocks#3547 (comment) |
…ther than accessing private class variables directly
enable_templating and expect_resolved_template_values
boegel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Both (templating and disabling the enforcing) should only be disabled temporarily so make the state private and expose only the context manager and a property.
2 small fixes in adjacent code:
resolve_templatemember instead of the free function to remove some C&P codeI also intended to make
asdicttrivial (see 2a63863) but as__getitem__checks for deprecated parameters on each access it might impact performance too much.Improvement after #4726