-
Notifications
You must be signed in to change notification settings - Fork 7
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
remove OptionalValueException? #4972
Comments
A non-exhaustive (exhaustive within the set of repos checked out on my system) overview of how this would affect other projects (assuming we keep the exception class around):
So the main consequences are that lsm and yang need minor changes, as well as any module that uses
|
Concluding: it's defintely not trivial and it may cause some fallout but it should be doable. Question is, do we want it sufficiently badly to do it now, before the iso6 release, or do we keep it for iso7? |
Planning meeting conclusion: delay this until a couple of months before the next major, migrate modules before that. I will create tickets for this and put them in the appropriate epics. |
inmanta/lsm#546 |
Make sure to read comments below, ticket description has not been updated
Currently an
OptionalValueException
is raised when an optional relation attribute is accessed that has not received a value or has received an explicitnull
value. This is inconsistent with the behavior for nullable plain attributes and that for multi relations, which result innull
and[]
respectively. The goal of this ticket is to investigate the feasibility and discuss the value of dropping theOptionalValueException
and returningnull
instead. When attempting to access an attribute/relation of the null relation, anOptionalValueException
should still be raised.As a next step, we could consider deprecating
is defined
in favor of!= null
/!= []
.The text was updated successfully, but these errors were encountered: