Remove the parameter queue and use the write_pending flag instead #237
Open
Guzz-T wants to merge 4 commits intoBouni:mainfrom
Open
Remove the parameter queue and use the write_pending flag instead #237Guzz-T wants to merge 4 commits intoBouni:mainfrom
Guzz-T wants to merge 4 commits intoBouni:mainfrom
Conversation
With these changes, the data to be written is stored directly in the field object, so that the values can also be set directly in the field via `value`.
…ved checks within set()
Coverage Report
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kbabioch
reviewed
Feb 16, 2026
| parameters.queue = {} | ||
| for index, field in parameters.data.items(): | ||
| if field.write_pending: | ||
| field.write_pending = False |
Collaborator
There was a problem hiding this comment.
Should this be set to False even though nothing has been written at this point? The code could still fail in the next couple of lines? Just wondering if it makes more sense to set it to false after the value has been written and/or read back?
Contributor
Author
There was a problem hiding this comment.
When assigning a value to raw, the write_pending flag is reseted.
Contributor
Author
There was a problem hiding this comment.
I would have first avoided a situation where a error during writing would lead to recurring errors. This most closely resembles the previous behavior, wherever the queue was cleared.
I am also considering whether to offer user-adjustable settings, which would allow the behavior to be configured.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With these changes, the data to be written is stored directly in the field object, so that the values can also be set directly in the field via
value.This is indirectly a breaking change, as the value of the field changes when
set()is called. This was not the case before. @Bouni, was there a specific reason why it was implemented this way?Previously:
Now:
Relates to #221